@aviala-design/spiral 0.0.2 → 0.1.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/index.js CHANGED
@@ -18,44 +18,6 @@ import {
18
18
  presetList,
19
19
  removeTheme
20
20
  } from "@aviala-design/tokens";
21
-
22
- // src/lib/keyboard-focus.ts
23
- var KEYBOARD_FOCUS_KEYS = /* @__PURE__ */ new Set([
24
- "Tab",
25
- "ArrowUp",
26
- "ArrowDown",
27
- "ArrowLeft",
28
- "ArrowRight",
29
- "Home",
30
- "End",
31
- "PageUp",
32
- "PageDown"
33
- ]);
34
- var initialized = false;
35
- function initKeyboardFocus() {
36
- if (initialized || typeof window === "undefined") return;
37
- initialized = true;
38
- const root = document.documentElement;
39
- const enable = () => {
40
- root.dataset.avialaKeyboardFocus = "";
41
- };
42
- const disable = () => {
43
- delete root.dataset.avialaKeyboardFocus;
44
- };
45
- window.addEventListener(
46
- "keydown",
47
- (event) => {
48
- if (KEYBOARD_FOCUS_KEYS.has(event.key)) {
49
- enable();
50
- }
51
- },
52
- true
53
- );
54
- window.addEventListener("mousedown", disable, true);
55
- window.addEventListener("pointerdown", disable, true);
56
- }
57
-
58
- // src/theme/theme-provider.tsx
59
21
  import { jsx } from "react/jsx-runtime";
60
22
  var ThemeContext = createContext(null);
61
23
  function ThemeProvider({
@@ -109,9 +71,6 @@ function ThemeProvider({
109
71
  }),
110
72
  [isStaticTheme, mode, primaryColor, presetId, paletteConfig]
111
73
  );
112
- useLayoutEffect(() => {
113
- initKeyboardFocus();
114
- }, []);
115
74
  useLayoutEffect(() => {
116
75
  applyBaseNumbersDensity(document.documentElement, density);
117
76
  if (isStaticTheme) {
@@ -375,11 +334,11 @@ var Typography = forwardRef2(
375
334
  level = "text",
376
335
  content = "text",
377
336
  tone = "default",
378
- as: Tag = "span",
337
+ as: Tag2 = "span",
379
338
  asChild = false,
380
339
  ...props
381
340
  }, ref) => {
382
- const Comp = asChild ? Slot : Tag;
341
+ const Comp = asChild ? Slot : Tag2;
383
342
  return /* @__PURE__ */ jsx3(
384
343
  Comp,
385
344
  {
@@ -466,7 +425,7 @@ var sizeLabelLevels = {
466
425
  big: "text"
467
426
  };
468
427
  var buttonVariants = cva3(
469
- "aviala-button relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden border-0 bg-transparent font-sans whitespace-nowrap focus-visible:outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-[var(--button-disabled-opacity,0.55)]",
428
+ "aviala-button aviala-focus-ring relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden border-0 bg-transparent font-sans whitespace-nowrap focus-visible:outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-[var(--button-disabled-opacity,0.55)]",
470
429
  {
471
430
  variants: {
472
431
  mode: {
@@ -655,7 +614,7 @@ var Button = forwardRef3(
655
614
  Button.displayName = "Button";
656
615
 
657
616
  // src/components/input.tsx
658
- import { cva as cva4 } from "class-variance-authority";
617
+ import { cva as cva5 } from "class-variance-authority";
659
618
  import {
660
619
  forwardRef as forwardRef5,
661
620
  isValidElement as isValidElement5,
@@ -663,30 +622,124 @@ import {
663
622
  } from "react";
664
623
 
665
624
  // src/components/badge.tsx
625
+ import { cva as cva4 } from "class-variance-authority";
666
626
  import {
667
627
  cloneElement as cloneElement2,
668
628
  forwardRef as forwardRef4,
669
629
  isValidElement as isValidElement4
670
630
  } from "react";
631
+ import { resolveIconSizeToken as resolveIconSizeToken3 } from "@aviala-design/icons";
671
632
  import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
672
- function renderBadgeIcon(node) {
633
+ var badgeVariants = cva4("aviala-badge", {
634
+ variants: {
635
+ style: {
636
+ theme: "aviala-badge--style-theme",
637
+ info: "aviala-badge--style-info",
638
+ fail: "aviala-badge--style-fail",
639
+ warning: "aviala-badge--style-warning",
640
+ success: "aviala-badge--style-success",
641
+ normal: "aviala-badge--style-normal"
642
+ },
643
+ level: {
644
+ caption: "aviala-badge--level-caption",
645
+ text: "aviala-badge--level-text"
646
+ },
647
+ primary: {
648
+ true: "aviala-badge--primary",
649
+ false: "aviala-badge--secondary"
650
+ },
651
+ lineHeightFix: {
652
+ text: "aviala-badge--lhf-text",
653
+ subtitle: "aviala-badge--lhf-subtitle",
654
+ off: "aviala-badge--lhf-off"
655
+ }
656
+ },
657
+ defaultVariants: {
658
+ style: "theme",
659
+ level: "caption",
660
+ primary: false,
661
+ lineHeightFix: "text"
662
+ }
663
+ });
664
+ function resolveLineHeightFix(level, lineHeightFix) {
665
+ if (lineHeightFix === false || lineHeightFix === "off") return "off";
666
+ if (lineHeightFix === "subtitle") return "subtitle";
667
+ if (lineHeightFix === "text" || lineHeightFix === true) {
668
+ return level === "text" ? "subtitle" : "text";
669
+ }
670
+ return level === "text" ? "subtitle" : "text";
671
+ }
672
+ function iconSizeForLevel(level) {
673
+ return resolveIconSizeToken3(level);
674
+ }
675
+ function renderBadgeIcon(node, level) {
673
676
  if (!node) return null;
674
- const content = isValidElement4(node) && typeof node.type !== "string" ? cloneElement2(node, {
675
- width: 18,
676
- height: 18,
677
- className: cn(
678
- node.props.className,
679
- "shrink-0"
680
- )
681
- }) : node;
677
+ const size = iconSizeForLevel(level);
678
+ const content = isValidElement4(node) && typeof node.type !== "string" ? cloneElement2(
679
+ node,
680
+ {
681
+ width: size,
682
+ height: size,
683
+ className: cn(
684
+ node.props.className,
685
+ "shrink-0"
686
+ )
687
+ }
688
+ ) : node;
682
689
  return /* @__PURE__ */ jsx5("span", { className: "aviala-badge__icon", "aria-hidden": true, children: content });
683
690
  }
684
691
  var Badge = forwardRef4(
685
- ({ className, children, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxs2("span", { ref, className: cn("aviala-badge", className), ...props, children: [
686
- renderBadgeIcon(leftIcon),
687
- /* @__PURE__ */ jsx5(Typography, { level: "text", as: "span", className: "aviala-badge__text whitespace-nowrap", children }),
688
- renderBadgeIcon(rightIcon)
689
- ] })
692
+ ({
693
+ className,
694
+ children,
695
+ leftIcon,
696
+ rightIcon,
697
+ style = "theme",
698
+ level = "caption",
699
+ primary = false,
700
+ lineHeightFix,
701
+ ...props
702
+ }, ref) => {
703
+ const resolvedLevel = level ?? "caption";
704
+ const resolvedStyle = style ?? "theme";
705
+ const resolvedLhf = resolveLineHeightFix(resolvedLevel, lineHeightFix);
706
+ const typographyLevel = resolvedLevel;
707
+ const tone = primary ? "white" : "default";
708
+ return /* @__PURE__ */ jsxs2(
709
+ "span",
710
+ {
711
+ ref,
712
+ className: cn(
713
+ badgeVariants({
714
+ style: resolvedStyle,
715
+ level: resolvedLevel,
716
+ primary,
717
+ lineHeightFix: resolvedLhf
718
+ }),
719
+ className
720
+ ),
721
+ "data-style": resolvedStyle,
722
+ "data-level": resolvedLevel,
723
+ "data-primary": primary ? "true" : "false",
724
+ "data-line-height-fix": resolvedLhf,
725
+ ...props,
726
+ children: [
727
+ renderBadgeIcon(leftIcon, resolvedLevel),
728
+ /* @__PURE__ */ jsx5(
729
+ Typography,
730
+ {
731
+ level: typographyLevel,
732
+ tone,
733
+ as: "span",
734
+ className: "aviala-badge__text whitespace-nowrap",
735
+ children
736
+ }
737
+ ),
738
+ renderBadgeIcon(rightIcon, resolvedLevel)
739
+ ]
740
+ }
741
+ );
742
+ }
690
743
  );
691
744
  Badge.displayName = "Badge";
692
745
 
@@ -697,7 +750,7 @@ function resolveInputState(value, defaultValue, focused) {
697
750
  if (String(current).length === 0) return "empty";
698
751
  return focused ? "typing" : "fill";
699
752
  }
700
- var inputRootVariants = cva4("aviala-input relative min-w-0 font-sans", {
753
+ var inputRootVariants = cva5("aviala-input relative min-w-0 font-sans", {
701
754
  variants: {
702
755
  fullWidth: {
703
756
  true: "w-full",
@@ -998,14 +1051,18 @@ var Link = forwardRef7(
998
1051
  const resolvedLevel = level ?? "caption";
999
1052
  const Comp = asChild ? Slot3 : "a";
1000
1053
  const sharedClassName = cn(
1001
- "aviala-link",
1054
+ "aviala-link aviala-focus-ring",
1002
1055
  iconOnly ? "aviala-link--icon-only" : void 0,
1003
1056
  className
1004
1057
  );
1005
- const disabledProps = disabled ? {
1006
- tabIndex: -1,
1007
- onClick: (e) => e.preventDefault()
1008
- } : {};
1058
+ const { href, onClick, tabIndex, ...restProps } = props;
1059
+ const handleClick = (e) => {
1060
+ if (disabled) {
1061
+ e.preventDefault();
1062
+ return;
1063
+ }
1064
+ onClick?.(e);
1065
+ };
1009
1066
  if (asChild) {
1010
1067
  return /* @__PURE__ */ jsx8(
1011
1068
  Comp,
@@ -1015,8 +1072,10 @@ var Link = forwardRef7(
1015
1072
  "data-disabled": disabled ? "true" : void 0,
1016
1073
  ref,
1017
1074
  "aria-disabled": disabled || void 0,
1018
- ...disabledProps,
1019
- ...props,
1075
+ ...restProps,
1076
+ href: disabled ? void 0 : href,
1077
+ tabIndex: disabled ? -1 : tabIndex,
1078
+ onClick: handleClick,
1020
1079
  children
1021
1080
  }
1022
1081
  );
@@ -1029,8 +1088,10 @@ var Link = forwardRef7(
1029
1088
  "data-disabled": disabled ? "true" : void 0,
1030
1089
  ref,
1031
1090
  "aria-disabled": disabled || void 0,
1032
- ...disabledProps,
1033
- ...props,
1091
+ ...restProps,
1092
+ href: disabled ? void 0 : href,
1093
+ tabIndex: disabled ? -1 : tabIndex,
1094
+ onClick: handleClick,
1034
1095
  children: [
1035
1096
  renderIcon2(leftIcon ?? (iconOnly ? rightIcon : void 0), resolvedLevel),
1036
1097
  !iconOnly && children !== void 0 && children !== null && /* @__PURE__ */ jsx8(
@@ -1512,7 +1573,7 @@ var SelectTrigger = forwardRef8(
1512
1573
  ref.current = node;
1513
1574
  }
1514
1575
  },
1515
- className: cn("aviala-select-trigger", className),
1576
+ className: cn("aviala-select-trigger aviala-focus-ring", className),
1516
1577
  "data-size": size,
1517
1578
  "data-all-round": allRound ? "true" : "false",
1518
1579
  "data-error": error ? "true" : void 0,
@@ -1659,7 +1720,7 @@ var SelectItem = forwardRef8(
1659
1720
  SelectPrimitive.Item,
1660
1721
  {
1661
1722
  ref,
1662
- className: cn("aviala-select-item", className),
1723
+ className: cn("aviala-select-item aviala-focus-ring", className),
1663
1724
  "data-layout": layout !== "default" ? layout : void 0,
1664
1725
  "data-function": itemFunction !== "action" ? itemFunction : void 0,
1665
1726
  ...spiralDebugId("select.content.item"),
@@ -1774,7 +1835,7 @@ var SelectSubItem = forwardRef8(
1774
1835
  {
1775
1836
  type: "button",
1776
1837
  disabled,
1777
- className: cn("aviala-select-item aviala-select-sub-item", className),
1838
+ className: cn("aviala-select-item aviala-select-sub-item aviala-focus-ring", className),
1778
1839
  "data-layout": layout !== "default" ? layout : void 0,
1779
1840
  "data-function": itemFunction !== "action" ? itemFunction : void 0,
1780
1841
  "data-state": open ? "open" : void 0,
@@ -1889,174 +1950,618 @@ var Label2 = forwardRef9(({ className, ...props }, ref) => /* @__PURE__ */ jsx10
1889
1950
  ));
1890
1951
  Label2.displayName = LabelPrimitive.Root.displayName;
1891
1952
 
1892
- // src/components/checkbox.tsx
1893
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
1894
- import { SymbolRight as SymbolRight2 } from "@aviala-design/icons";
1953
+ // src/components/avatar.tsx
1954
+ import { cva as cva6 } from "class-variance-authority";
1895
1955
  import {
1896
1956
  cloneElement as cloneElement3,
1897
- forwardRef as forwardRef11,
1957
+ forwardRef as forwardRef10,
1898
1958
  isValidElement as isValidElement7
1899
1959
  } from "react";
1900
-
1901
- // src/components/typeface.tsx
1902
- import { forwardRef as forwardRef10 } from "react";
1903
- import { jsx as jsx11 } from "react/jsx-runtime";
1904
- var typefaceLayouts = {
1905
- allCustom: [
1906
- { level: "text", children: null },
1907
- { level: "caption", children: null }
1908
- ],
1909
- textCaption: [
1910
- { level: "text", children: null },
1911
- { level: "caption", children: null }
1912
- ],
1913
- textCaptionSubtitle: [
1914
- { level: "subtitle", children: null },
1915
- { level: "text", children: null },
1916
- { level: "caption", children: null }
1917
- ],
1918
- textTitle: [
1919
- { level: "title", children: null },
1920
- { level: "text", children: null }
1921
- ],
1922
- textHeadline2: [
1923
- { level: "headline2", children: null },
1924
- { level: "text", children: null }
1925
- ],
1926
- textHeadline1: [
1927
- { level: "headline1", children: null },
1928
- { level: "text", children: null }
1929
- ]
1960
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1961
+ var avatarVariants = cva6("aviala-avatar", {
1962
+ variants: {
1963
+ level: {
1964
+ display: "aviala-avatar--level-display",
1965
+ headline1: "aviala-avatar--level-headline1",
1966
+ headline2: "aviala-avatar--level-headline2",
1967
+ title: "aviala-avatar--level-title",
1968
+ subtitle: "aviala-avatar--level-subtitle",
1969
+ text: "aviala-avatar--level-text"
1970
+ },
1971
+ content: {
1972
+ text: "aviala-avatar--content-text",
1973
+ picture: "aviala-avatar--content-picture",
1974
+ icon: "aviala-avatar--content-icon"
1975
+ },
1976
+ lineHeightFix: {
1977
+ true: "aviala-avatar--line-height-fix",
1978
+ false: ""
1979
+ }
1980
+ },
1981
+ defaultVariants: {
1982
+ level: "text",
1983
+ content: "text",
1984
+ lineHeightFix: true
1985
+ }
1986
+ });
1987
+ var AVATAR_TEXT_LEVEL = {
1988
+ display: "subtitle",
1989
+ headline1: "text",
1990
+ headline2: "caption",
1991
+ title: "caption",
1992
+ subtitle: "caption",
1993
+ text: "caption"
1930
1994
  };
1931
- var Typeface = forwardRef10(
1995
+ var AVATAR_ICON_SIZE = {
1996
+ display: "var(--size-middle, 1rem)",
1997
+ headline1: "var(--size-regular, 0.875rem)",
1998
+ headline2: "var(--size-small, 0.75rem)",
1999
+ title: "var(--size-small, 0.75rem)",
2000
+ subtitle: "var(--size-tiny, 0.625rem)",
2001
+ text: "0.5rem"
2002
+ };
2003
+ function renderAvatarIcon(node, level) {
2004
+ if (!node) return null;
2005
+ const size = AVATAR_ICON_SIZE[level];
2006
+ if (isValidElement7(node) && typeof node.type !== "string") {
2007
+ return cloneElement3(
2008
+ node,
2009
+ {
2010
+ width: size,
2011
+ height: size,
2012
+ className: cn(node.props.className, "shrink-0")
2013
+ }
2014
+ );
2015
+ }
2016
+ return node;
2017
+ }
2018
+ var Avatar = forwardRef10(
1932
2019
  ({
1933
2020
  className,
1934
- content = "allCustom",
1935
- primary,
1936
- secondary,
1937
- tertiary,
1938
- primaryContent = "text",
1939
- secondaryContent = "text",
1940
- tertiaryContent = "text",
1941
- tone = "default",
2021
+ level = "text",
2022
+ content = "text",
2023
+ lineHeightFix = true,
1942
2024
  children,
2025
+ src,
2026
+ alt = "",
2027
+ icon,
2028
+ imgProps,
1943
2029
  ...props
1944
2030
  }, ref) => {
1945
- const layout = typefaceLayouts[content];
1946
- const values = resolveTypefaceValues(content, primary, secondary, tertiary, children);
1947
- return /* @__PURE__ */ jsx11("div", { ref, className: cn("aviala-typeface", className), "data-content": content, ...props, children: layout.map((line, index) => {
1948
- const value = values[index];
1949
- if (value === void 0 || value === null || value === false) return null;
1950
- const lineContent = index === 0 ? primaryContent : index === 1 ? secondaryContent : tertiaryContent;
1951
- return /* @__PURE__ */ jsx11("span", { className: "aviala-typeface__line", children: /* @__PURE__ */ jsx11(Typography, { level: line.level, content: lineContent, tone, children: value }) }, `${line.level}-${index}`);
1952
- }) });
2031
+ const resolvedLevel = level ?? "text";
2032
+ const resolvedContent = content ?? "text";
2033
+ return /* @__PURE__ */ jsx11(
2034
+ "span",
2035
+ {
2036
+ ref,
2037
+ className: cn(
2038
+ avatarVariants({
2039
+ level: resolvedLevel,
2040
+ content: resolvedContent,
2041
+ lineHeightFix: lineHeightFix ?? true
2042
+ }),
2043
+ className
2044
+ ),
2045
+ "data-level": resolvedLevel,
2046
+ "data-content": resolvedContent,
2047
+ "data-line-height-fix": lineHeightFix ? "true" : "false",
2048
+ ...props,
2049
+ children: /* @__PURE__ */ jsxs7("span", { className: "aviala-avatar__surface", children: [
2050
+ resolvedContent === "picture" && src ? /* @__PURE__ */ jsx11(
2051
+ "img",
2052
+ {
2053
+ className: "aviala-avatar__image",
2054
+ src,
2055
+ alt,
2056
+ ...imgProps
2057
+ }
2058
+ ) : null,
2059
+ resolvedContent === "icon" ? /* @__PURE__ */ jsx11("span", { className: "aviala-avatar__icon", "aria-hidden": true, children: renderAvatarIcon(icon, resolvedLevel) }) : null,
2060
+ resolvedContent === "text" ? /* @__PURE__ */ jsx11(
2061
+ Typography,
2062
+ {
2063
+ level: AVATAR_TEXT_LEVEL[resolvedLevel],
2064
+ as: "span",
2065
+ className: "aviala-avatar__text",
2066
+ children
2067
+ }
2068
+ ) : null
2069
+ ] })
2070
+ }
2071
+ );
1953
2072
  }
1954
2073
  );
1955
- Typeface.displayName = "Typeface";
1956
- function resolveTypefaceValues(content, primary, secondary, tertiary, children) {
1957
- if (primary !== void 0 || secondary !== void 0 || tertiary !== void 0) {
1958
- return [primary, secondary, tertiary];
1959
- }
1960
- if (children == null || children === false) {
1961
- return typefaceLayouts[content].map(() => "Text");
2074
+ Avatar.displayName = "Avatar";
2075
+
2076
+ // src/components/tag.tsx
2077
+ import { resolveIconSizeToken as resolveIconSizeToken4, SymbolWrong } from "@aviala-design/icons";
2078
+ import { cva as cva7 } from "class-variance-authority";
2079
+ import {
2080
+ cloneElement as cloneElement4,
2081
+ forwardRef as forwardRef11,
2082
+ isValidElement as isValidElement8
2083
+ } from "react";
2084
+ import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
2085
+ var tagVariants = cva7("aviala-tag", {
2086
+ variants: {
2087
+ level: {
2088
+ caption: "aviala-tag--level-caption",
2089
+ text: "aviala-tag--level-text"
2090
+ },
2091
+ content: {
2092
+ text: "aviala-tag--content-text",
2093
+ people: "aviala-tag--content-people"
2094
+ },
2095
+ lineHeightFix: {
2096
+ text: "aviala-tag--lhf-text",
2097
+ subtitle: "aviala-tag--lhf-subtitle",
2098
+ off: "aviala-tag--lhf-off"
2099
+ }
2100
+ },
2101
+ defaultVariants: {
2102
+ level: "caption",
2103
+ content: "text",
2104
+ lineHeightFix: "text"
1962
2105
  }
1963
- if (Array.isArray(children)) {
1964
- return children;
2106
+ });
2107
+ function resolveLineHeightFix2(level, lineHeightFix) {
2108
+ if (lineHeightFix === false || lineHeightFix === "off") return "off";
2109
+ if (lineHeightFix === "subtitle") return "subtitle";
2110
+ if (lineHeightFix === "text" || lineHeightFix === true) {
2111
+ return level === "text" ? "subtitle" : "text";
1965
2112
  }
1966
- return [children];
2113
+ return level === "text" ? "subtitle" : "text";
1967
2114
  }
1968
- var TypefacePair = forwardRef10(
1969
- ({ title, description, ...props }, ref) => /* @__PURE__ */ jsx11(
1970
- Typeface,
2115
+ function iconSizeForLevel2(level) {
2116
+ return level === "caption" ? resolveIconSizeToken4("text") : resolveIconSizeToken4("text", true);
2117
+ }
2118
+ function renderTagIcon(node, level) {
2119
+ if (!node) return null;
2120
+ const size = iconSizeForLevel2(level);
2121
+ const content = isValidElement8(node) && typeof node.type !== "string" ? cloneElement4(
2122
+ node,
1971
2123
  {
1972
- ref,
1973
- content: "textCaption",
1974
- primary: title,
1975
- secondary: description,
1976
- ...props
2124
+ width: size,
2125
+ height: size,
2126
+ className: cn(
2127
+ node.props.className,
2128
+ "shrink-0"
2129
+ )
1977
2130
  }
1978
- )
1979
- );
1980
- TypefacePair.displayName = "TypefacePair";
1981
-
1982
- // src/components/checkbox.tsx
1983
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1984
- var Checkbox = forwardRef11(({ className, round = false, ...props }, ref) => /* @__PURE__ */ jsxs7(
1985
- CheckboxPrimitive.Root,
1986
- {
1987
- ref,
1988
- className: cn("aviala-checkbox", className),
1989
- "data-round": round ? "true" : void 0,
1990
- ...props,
1991
- children: [
1992
- /* @__PURE__ */ jsx12("span", { "aria-hidden": true, className: "aviala-checkbox__surface" }),
1993
- /* @__PURE__ */ jsxs7(CheckboxPrimitive.Indicator, { className: "aviala-checkbox__indicator", children: [
1994
- /* @__PURE__ */ jsx12(
1995
- SymbolRight2,
1996
- {
1997
- className: "aviala-checkbox__indicator-icon aviala-checkbox__indicator-icon--check",
1998
- thickness: "Bold",
1999
- width: 12,
2000
- height: 12,
2001
- "aria-hidden": true
2002
- }
2003
- ),
2004
- /* @__PURE__ */ jsx12(
2005
- "span",
2006
- {
2007
- "aria-hidden": true,
2008
- className: "aviala-checkbox__indeterminate-mark aviala-checkbox__indicator-icon--indeterminate"
2009
- }
2010
- )
2011
- ] })
2012
- ]
2013
- }
2014
- ));
2015
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
2016
- var CheckboxGroup = forwardRef11(
2017
- ({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx12(
2018
- "div",
2131
+ ) : node;
2132
+ return /* @__PURE__ */ jsx12("span", { className: "aviala-tag__icon", "aria-hidden": true, children: content });
2133
+ }
2134
+ var TagClose = forwardRef11(
2135
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx12(
2136
+ "button",
2019
2137
  {
2020
2138
  ref,
2021
- className: cn("aviala-checkbox-group", className),
2022
- "data-direction": direction,
2023
- ...props
2139
+ type: "button",
2140
+ className: cn("aviala-tag__close aviala-focus-ring", className),
2141
+ ...props,
2142
+ children: children ?? /* @__PURE__ */ jsx12(SymbolWrong, { "aria-hidden": true, width: 14, height: 14 })
2024
2143
  }
2025
2144
  )
2026
2145
  );
2027
- CheckboxGroup.displayName = "CheckboxGroup";
2028
- function renderIcon3(node) {
2029
- if (!node) return null;
2030
- const icon = 18;
2031
- const content = isValidElement7(node) && typeof node.type !== "string" ? cloneElement3(node, {
2032
- width: icon,
2033
- height: icon,
2034
- className: cn(
2035
- node.props.className,
2036
- "shrink-0"
2037
- )
2038
- }) : node;
2039
- return /* @__PURE__ */ jsx12("span", { className: "aviala-checkbox-input__icon", children: content });
2040
- }
2041
- var CheckboxInput = forwardRef11(
2146
+ TagClose.displayName = "TagClose";
2147
+ var Tag = forwardRef11(
2042
2148
  ({
2043
2149
  className,
2044
- title,
2045
- description,
2046
- icon,
2047
- disabled,
2048
- id,
2049
- ...props
2050
- }, ref) => /* @__PURE__ */ jsxs7(
2051
- "label",
2150
+ children,
2151
+ leftIcon,
2152
+ rightIcon,
2153
+ level = "caption",
2154
+ content = "text",
2155
+ disabled = false,
2156
+ avatar,
2157
+ avatarSrc,
2158
+ avatarText,
2159
+ closable = false,
2160
+ onClose,
2161
+ closeLabel = "Remove",
2162
+ lineHeightFix,
2163
+ ...props
2164
+ }, ref) => {
2165
+ const resolvedLevel = level ?? "caption";
2166
+ const resolvedContent = content ?? "text";
2167
+ const resolvedLhf = resolveLineHeightFix2(resolvedLevel, lineHeightFix);
2168
+ const typographyLevel = resolvedLevel;
2169
+ const peopleAvatar = avatar ?? (avatarSrc ? /* @__PURE__ */ jsx12(Avatar, { level: "text", content: "picture", src: avatarSrc, lineHeightFix: false }) : /* @__PURE__ */ jsx12(Avatar, { level: "text", content: "text", lineHeightFix: false, children: avatarText ?? (typeof children === "string" ? children.charAt(0) : "?") }));
2170
+ return /* @__PURE__ */ jsxs8(
2171
+ "span",
2172
+ {
2173
+ ref,
2174
+ className: cn(
2175
+ tagVariants({
2176
+ level: resolvedLevel,
2177
+ content: resolvedContent,
2178
+ lineHeightFix: resolvedLhf
2179
+ }),
2180
+ className
2181
+ ),
2182
+ "data-level": resolvedLevel,
2183
+ "data-content": resolvedContent,
2184
+ "data-disabled": disabled ? "true" : void 0,
2185
+ "data-line-height-fix": resolvedLhf,
2186
+ "aria-disabled": disabled || void 0,
2187
+ ...props,
2188
+ children: [
2189
+ resolvedContent === "people" ? /* @__PURE__ */ jsx12("span", { className: "aviala-tag__avatar", children: peopleAvatar }) : renderTagIcon(leftIcon, resolvedLevel),
2190
+ /* @__PURE__ */ jsx12(
2191
+ Typography,
2192
+ {
2193
+ level: typographyLevel,
2194
+ as: "span",
2195
+ className: "aviala-tag__text whitespace-nowrap",
2196
+ children
2197
+ }
2198
+ ),
2199
+ resolvedContent === "text" ? renderTagIcon(rightIcon, resolvedLevel) : null,
2200
+ closable ? /* @__PURE__ */ jsx12(
2201
+ TagClose,
2202
+ {
2203
+ "aria-label": closeLabel,
2204
+ disabled,
2205
+ onClick: (event) => {
2206
+ if (disabled) return;
2207
+ onClose?.(event);
2208
+ }
2209
+ }
2210
+ ) : null
2211
+ ]
2212
+ }
2213
+ );
2214
+ }
2215
+ );
2216
+ Tag.displayName = "Tag";
2217
+
2218
+ // src/components/progress.tsx
2219
+ import { cva as cva8 } from "class-variance-authority";
2220
+ import { forwardRef as forwardRef12 } from "react";
2221
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
2222
+ var progressVariants = cva8("aviala-progress", {
2223
+ variants: {
2224
+ type: {
2225
+ default: "aviala-progress--type-default",
2226
+ success: "aviala-progress--type-success",
2227
+ fail: "aviala-progress--type-fail"
2228
+ },
2229
+ size: {
2230
+ default: "aviala-progress--size-default",
2231
+ big: "aviala-progress--size-big"
2232
+ },
2233
+ shape: {
2234
+ bar: "aviala-progress--shape-bar",
2235
+ ring: "aviala-progress--shape-ring"
2236
+ }
2237
+ },
2238
+ defaultVariants: {
2239
+ type: "default",
2240
+ size: "default",
2241
+ shape: "bar"
2242
+ }
2243
+ });
2244
+ function clampPercent(value) {
2245
+ if (!Number.isFinite(value)) return 0;
2246
+ return Math.min(100, Math.max(0, value));
2247
+ }
2248
+ var Progress = forwardRef12(
2249
+ ({
2250
+ className,
2251
+ type = "default",
2252
+ size = "default",
2253
+ shape = "bar",
2254
+ value = 0,
2255
+ showLabel = true,
2256
+ label,
2257
+ ...props
2258
+ }, ref) => {
2259
+ const percent = clampPercent(value ?? 0);
2260
+ const resolvedType = type ?? "default";
2261
+ const resolvedSize = size ?? "default";
2262
+ const resolvedShape = shape ?? "bar";
2263
+ const displayLabel = label ?? `${Math.round(percent)}%`;
2264
+ const diameter = resolvedSize === "big" ? 24 : 16;
2265
+ const radius = diameter / 2;
2266
+ const stroke = 2;
2267
+ const normalizedRadius = radius - stroke;
2268
+ const circumference = normalizedRadius * 2 * Math.PI;
2269
+ const strokeDashoffset = circumference - percent / 100 * circumference;
2270
+ return /* @__PURE__ */ jsx13(
2271
+ "div",
2272
+ {
2273
+ ref,
2274
+ role: "progressbar",
2275
+ "aria-valuemin": 0,
2276
+ "aria-valuemax": 100,
2277
+ "aria-valuenow": Math.round(percent),
2278
+ "aria-label": props["aria-label"] ?? displayLabel,
2279
+ className: cn(
2280
+ progressVariants({
2281
+ type: resolvedType,
2282
+ size: resolvedSize,
2283
+ shape: resolvedShape
2284
+ }),
2285
+ className
2286
+ ),
2287
+ "data-type": resolvedType,
2288
+ "data-size": resolvedSize,
2289
+ "data-shape": resolvedShape,
2290
+ ...props,
2291
+ children: resolvedShape === "bar" ? /* @__PURE__ */ jsxs9(Fragment2, { children: [
2292
+ /* @__PURE__ */ jsx13("div", { className: "aviala-progress__track", children: /* @__PURE__ */ jsx13(
2293
+ "div",
2294
+ {
2295
+ className: "aviala-progress__fill",
2296
+ style: { width: `${percent}%` }
2297
+ }
2298
+ ) }),
2299
+ showLabel ? /* @__PURE__ */ jsx13(
2300
+ Typography,
2301
+ {
2302
+ level: "caption",
2303
+ content: "number",
2304
+ as: "span",
2305
+ className: "aviala-progress__label",
2306
+ children: displayLabel
2307
+ }
2308
+ ) : null
2309
+ ] }) : /* @__PURE__ */ jsxs9(
2310
+ "svg",
2311
+ {
2312
+ className: "aviala-progress__ring",
2313
+ width: radius * 2,
2314
+ height: radius * 2,
2315
+ viewBox: `0 0 ${radius * 2} ${radius * 2}`,
2316
+ "aria-hidden": true,
2317
+ children: [
2318
+ /* @__PURE__ */ jsx13(
2319
+ "circle",
2320
+ {
2321
+ className: "aviala-progress__ring-track",
2322
+ cx: radius,
2323
+ cy: radius,
2324
+ r: normalizedRadius,
2325
+ fill: "none",
2326
+ strokeWidth: stroke
2327
+ }
2328
+ ),
2329
+ /* @__PURE__ */ jsx13(
2330
+ "circle",
2331
+ {
2332
+ className: "aviala-progress__ring-fill",
2333
+ cx: radius,
2334
+ cy: radius,
2335
+ r: normalizedRadius,
2336
+ fill: "none",
2337
+ strokeWidth: stroke,
2338
+ strokeDasharray: `${circumference} ${circumference}`,
2339
+ strokeDashoffset,
2340
+ strokeLinecap: "round",
2341
+ transform: `rotate(-90 ${radius} ${radius})`
2342
+ }
2343
+ )
2344
+ ]
2345
+ }
2346
+ )
2347
+ }
2348
+ );
2349
+ }
2350
+ );
2351
+ Progress.displayName = "Progress";
2352
+
2353
+ // src/components/scroll.tsx
2354
+ import { cva as cva9 } from "class-variance-authority";
2355
+ import { forwardRef as forwardRef13 } from "react";
2356
+ import { jsx as jsx14 } from "react/jsx-runtime";
2357
+ var scrollVariants = cva9("aviala-scroll", {
2358
+ variants: {
2359
+ size: {
2360
+ default: "aviala-scroll--size-default",
2361
+ small: "aviala-scroll--size-small"
2362
+ },
2363
+ orientation: {
2364
+ vertical: "aviala-scroll--orientation-vertical",
2365
+ horizontal: "aviala-scroll--orientation-horizontal"
2366
+ }
2367
+ },
2368
+ defaultVariants: {
2369
+ size: "default",
2370
+ orientation: "vertical"
2371
+ }
2372
+ });
2373
+ var Scroll = forwardRef13(
2374
+ ({
2375
+ className,
2376
+ size = "default",
2377
+ orientation = "vertical",
2378
+ children,
2379
+ ...props
2380
+ }, ref) => /* @__PURE__ */ jsx14(
2381
+ "div",
2382
+ {
2383
+ ref,
2384
+ className: cn(
2385
+ scrollVariants({ size: size ?? "default", orientation: orientation ?? "vertical" }),
2386
+ className
2387
+ ),
2388
+ "data-size": size ?? "default",
2389
+ "data-orientation": orientation ?? "vertical",
2390
+ ...props,
2391
+ children
2392
+ }
2393
+ )
2394
+ );
2395
+ Scroll.displayName = "Scroll";
2396
+
2397
+ // src/components/checkbox.tsx
2398
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2399
+ import { SymbolRight as SymbolRight2 } from "@aviala-design/icons";
2400
+ import {
2401
+ cloneElement as cloneElement5,
2402
+ forwardRef as forwardRef15,
2403
+ isValidElement as isValidElement9
2404
+ } from "react";
2405
+
2406
+ // src/components/typeface.tsx
2407
+ import { forwardRef as forwardRef14 } from "react";
2408
+ import { jsx as jsx15 } from "react/jsx-runtime";
2409
+ var typefaceLayouts = {
2410
+ allCustom: [
2411
+ { level: "text", children: null },
2412
+ { level: "caption", children: null }
2413
+ ],
2414
+ textCaption: [
2415
+ { level: "text", children: null },
2416
+ { level: "caption", children: null }
2417
+ ],
2418
+ textCaptionSubtitle: [
2419
+ { level: "subtitle", children: null },
2420
+ { level: "text", children: null },
2421
+ { level: "caption", children: null }
2422
+ ],
2423
+ textTitle: [
2424
+ { level: "title", children: null },
2425
+ { level: "text", children: null }
2426
+ ],
2427
+ textHeadline2: [
2428
+ { level: "headline2", children: null },
2429
+ { level: "text", children: null }
2430
+ ],
2431
+ textHeadline1: [
2432
+ { level: "headline1", children: null },
2433
+ { level: "text", children: null }
2434
+ ]
2435
+ };
2436
+ var Typeface = forwardRef14(
2437
+ ({
2438
+ className,
2439
+ content = "allCustom",
2440
+ primary,
2441
+ secondary,
2442
+ tertiary,
2443
+ primaryContent = "text",
2444
+ secondaryContent = "text",
2445
+ tertiaryContent = "text",
2446
+ tone = "default",
2447
+ children,
2448
+ ...props
2449
+ }, ref) => {
2450
+ const layout = typefaceLayouts[content];
2451
+ const values = resolveTypefaceValues(content, primary, secondary, tertiary, children);
2452
+ return /* @__PURE__ */ jsx15("div", { ref, className: cn("aviala-typeface", className), "data-content": content, ...props, children: layout.map((line, index) => {
2453
+ const value = values[index];
2454
+ if (value === void 0 || value === null || value === false) return null;
2455
+ const lineContent = index === 0 ? primaryContent : index === 1 ? secondaryContent : tertiaryContent;
2456
+ return /* @__PURE__ */ jsx15("span", { className: "aviala-typeface__line", children: /* @__PURE__ */ jsx15(Typography, { level: line.level, content: lineContent, tone, children: value }) }, `${line.level}-${index}`);
2457
+ }) });
2458
+ }
2459
+ );
2460
+ Typeface.displayName = "Typeface";
2461
+ function resolveTypefaceValues(content, primary, secondary, tertiary, children) {
2462
+ if (primary !== void 0 || secondary !== void 0 || tertiary !== void 0) {
2463
+ return [primary, secondary, tertiary];
2464
+ }
2465
+ if (children == null || children === false) {
2466
+ return typefaceLayouts[content].map(() => "Text");
2467
+ }
2468
+ if (Array.isArray(children)) {
2469
+ return children;
2470
+ }
2471
+ return [children];
2472
+ }
2473
+ var TypefacePair = forwardRef14(
2474
+ ({ title, description, ...props }, ref) => /* @__PURE__ */ jsx15(
2475
+ Typeface,
2476
+ {
2477
+ ref,
2478
+ content: "textCaption",
2479
+ primary: title,
2480
+ secondary: description,
2481
+ ...props
2482
+ }
2483
+ )
2484
+ );
2485
+ TypefacePair.displayName = "TypefacePair";
2486
+
2487
+ // src/components/checkbox.tsx
2488
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
2489
+ var Checkbox = forwardRef15(({ className, round = false, ...props }, ref) => /* @__PURE__ */ jsxs10(
2490
+ CheckboxPrimitive.Root,
2491
+ {
2492
+ ref,
2493
+ className: cn("aviala-checkbox aviala-focus-ring", className),
2494
+ "data-round": round ? "true" : void 0,
2495
+ ...props,
2496
+ children: [
2497
+ /* @__PURE__ */ jsx16("span", { "aria-hidden": true, className: "aviala-checkbox__surface" }),
2498
+ /* @__PURE__ */ jsxs10(CheckboxPrimitive.Indicator, { className: "aviala-checkbox__indicator", children: [
2499
+ /* @__PURE__ */ jsx16(
2500
+ SymbolRight2,
2501
+ {
2502
+ className: "aviala-checkbox__indicator-icon aviala-checkbox__indicator-icon--check",
2503
+ thickness: "Bold",
2504
+ width: 12,
2505
+ height: 12,
2506
+ "aria-hidden": true
2507
+ }
2508
+ ),
2509
+ /* @__PURE__ */ jsx16(
2510
+ "span",
2511
+ {
2512
+ "aria-hidden": true,
2513
+ className: "aviala-checkbox__indeterminate-mark aviala-checkbox__indicator-icon--indeterminate"
2514
+ }
2515
+ )
2516
+ ] })
2517
+ ]
2518
+ }
2519
+ ));
2520
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
2521
+ var CheckboxGroup = forwardRef15(
2522
+ ({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx16(
2523
+ "div",
2524
+ {
2525
+ ref,
2526
+ className: cn("aviala-checkbox-group", className),
2527
+ "data-direction": direction,
2528
+ ...props
2529
+ }
2530
+ )
2531
+ );
2532
+ CheckboxGroup.displayName = "CheckboxGroup";
2533
+ function renderIcon3(node) {
2534
+ if (!node) return null;
2535
+ const icon = 18;
2536
+ const content = isValidElement9(node) && typeof node.type !== "string" ? cloneElement5(node, {
2537
+ width: icon,
2538
+ height: icon,
2539
+ className: cn(
2540
+ node.props.className,
2541
+ "shrink-0"
2542
+ )
2543
+ }) : node;
2544
+ return /* @__PURE__ */ jsx16("span", { className: "aviala-checkbox-input__icon", children: content });
2545
+ }
2546
+ var CheckboxInput = forwardRef15(
2547
+ ({
2548
+ className,
2549
+ title,
2550
+ description,
2551
+ icon,
2552
+ disabled,
2553
+ id,
2554
+ ...props
2555
+ }, ref) => /* @__PURE__ */ jsxs10(
2556
+ "label",
2052
2557
  {
2053
2558
  htmlFor: id,
2054
2559
  className: cn("aviala-checkbox-input", className),
2055
2560
  "data-disabled": disabled ? "true" : void 0,
2056
2561
  children: [
2057
- /* @__PURE__ */ jsx12(Checkbox, { ref, id, disabled, ...props }),
2562
+ /* @__PURE__ */ jsx16(Checkbox, { ref, id, disabled, ...props }),
2058
2563
  renderIcon3(icon),
2059
- /* @__PURE__ */ jsx12(
2564
+ /* @__PURE__ */ jsx16(
2060
2565
  TypefacePair,
2061
2566
  {
2062
2567
  className: "aviala-checkbox-input__content min-w-0 flex-1",
@@ -2073,12 +2578,12 @@ CheckboxInput.displayName = "CheckboxInput";
2073
2578
  // src/components/radio-group.tsx
2074
2579
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
2075
2580
  import {
2076
- cloneElement as cloneElement4,
2077
- forwardRef as forwardRef12,
2078
- isValidElement as isValidElement8
2581
+ cloneElement as cloneElement6,
2582
+ forwardRef as forwardRef16,
2583
+ isValidElement as isValidElement10
2079
2584
  } from "react";
2080
- import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
2081
- var RadioGroup = forwardRef12(({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx13(
2585
+ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
2586
+ var RadioGroup = forwardRef16(({ className, direction = "vertical", ...props }, ref) => /* @__PURE__ */ jsx17(
2082
2587
  RadioGroupPrimitive.Root,
2083
2588
  {
2084
2589
  className: cn("aviala-radio-group", className),
@@ -2088,15 +2593,15 @@ var RadioGroup = forwardRef12(({ className, direction = "vertical", ...props },
2088
2593
  }
2089
2594
  ));
2090
2595
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
2091
- var RadioGroupItem = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */ jsxs8(
2596
+ var RadioGroupItem = forwardRef16(({ className, ...props }, ref) => /* @__PURE__ */ jsxs11(
2092
2597
  RadioGroupPrimitive.Item,
2093
2598
  {
2094
2599
  ref,
2095
- className: cn("aviala-radio", className),
2600
+ className: cn("aviala-radio aviala-focus-ring", className),
2096
2601
  ...props,
2097
2602
  children: [
2098
- /* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "aviala-radio__surface" }),
2099
- /* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "aviala-radio__indicator" })
2603
+ /* @__PURE__ */ jsx17("span", { "aria-hidden": true, className: "aviala-radio__surface" }),
2604
+ /* @__PURE__ */ jsx17("span", { "aria-hidden": true, className: "aviala-radio__indicator" })
2100
2605
  ]
2101
2606
  }
2102
2607
  ));
@@ -2104,7 +2609,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
2104
2609
  function renderIcon4(node) {
2105
2610
  if (!node) return null;
2106
2611
  const icon = 18;
2107
- const content = isValidElement8(node) && typeof node.type !== "string" ? cloneElement4(node, {
2612
+ const content = isValidElement10(node) && typeof node.type !== "string" ? cloneElement6(node, {
2108
2613
  width: icon,
2109
2614
  height: icon,
2110
2615
  className: cn(
@@ -2112,9 +2617,9 @@ function renderIcon4(node) {
2112
2617
  "shrink-0"
2113
2618
  )
2114
2619
  }) : node;
2115
- return /* @__PURE__ */ jsx13("span", { className: "aviala-radio-input__icon", children: content });
2620
+ return /* @__PURE__ */ jsx17("span", { className: "aviala-radio-input__icon", children: content });
2116
2621
  }
2117
- var RadioInput = forwardRef12(
2622
+ var RadioInput = forwardRef16(
2118
2623
  ({
2119
2624
  className,
2120
2625
  title,
@@ -2124,7 +2629,7 @@ var RadioInput = forwardRef12(
2124
2629
  disabled,
2125
2630
  id,
2126
2631
  ...props
2127
- }, ref) => /* @__PURE__ */ jsxs8(
2632
+ }, ref) => /* @__PURE__ */ jsxs11(
2128
2633
  "label",
2129
2634
  {
2130
2635
  htmlFor: id,
@@ -2132,9 +2637,9 @@ var RadioInput = forwardRef12(
2132
2637
  "data-style": variant,
2133
2638
  "data-disabled": disabled ? "true" : void 0,
2134
2639
  children: [
2135
- /* @__PURE__ */ jsx13(RadioGroupItem, { ref, id, disabled, ...props }),
2640
+ /* @__PURE__ */ jsx17(RadioGroupItem, { ref, id, disabled, ...props }),
2136
2641
  renderIcon4(icon),
2137
- /* @__PURE__ */ jsx13(
2642
+ /* @__PURE__ */ jsx17(
2138
2643
  TypefacePair,
2139
2644
  {
2140
2645
  className: "aviala-radio-input__content min-w-0 flex-1",
@@ -2150,21 +2655,21 @@ RadioInput.displayName = "RadioInput";
2150
2655
 
2151
2656
  // src/components/switch.tsx
2152
2657
  import * as SwitchPrimitive from "@radix-ui/react-switch";
2153
- import { forwardRef as forwardRef13 } from "react";
2154
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
2155
- var Switch = forwardRef13(({ className, size = "regular", ...props }, ref) => /* @__PURE__ */ jsxs9(
2658
+ import { forwardRef as forwardRef17 } from "react";
2659
+ import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
2660
+ var Switch = forwardRef17(({ className, size = "regular", ...props }, ref) => /* @__PURE__ */ jsxs12(
2156
2661
  SwitchPrimitive.Root,
2157
2662
  {
2158
2663
  className: cn(
2159
- "aviala-switch",
2664
+ "aviala-switch aviala-focus-ring",
2160
2665
  size === "small" && "aviala-switch--small",
2161
2666
  className
2162
2667
  ),
2163
2668
  ref,
2164
2669
  ...props,
2165
2670
  children: [
2166
- /* @__PURE__ */ jsx14("span", { "aria-hidden": true, className: "aviala-switch__surface" }),
2167
- /* @__PURE__ */ jsx14(SwitchPrimitive.Thumb, { className: "aviala-switch__thumb" })
2671
+ /* @__PURE__ */ jsx18("span", { "aria-hidden": true, className: "aviala-switch__surface" }),
2672
+ /* @__PURE__ */ jsx18(SwitchPrimitive.Thumb, { className: "aviala-switch__thumb" })
2168
2673
  ]
2169
2674
  }
2170
2675
  ));
@@ -2173,14 +2678,14 @@ Switch.displayName = SwitchPrimitive.Root.displayName;
2173
2678
  // src/components/anchor.tsx
2174
2679
  import { Slot as Slot4 } from "@radix-ui/react-slot";
2175
2680
  import {
2176
- forwardRef as forwardRef14
2681
+ forwardRef as forwardRef18
2177
2682
  } from "react";
2178
- import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
2179
- var Anchor2 = forwardRef14(
2180
- ({ className, as: Tag = "nav", ...props }, ref) => /* @__PURE__ */ jsx15(Tag, { ref, className: cn("aviala-anchor", className), ...props })
2683
+ import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
2684
+ var Anchor2 = forwardRef18(
2685
+ ({ className, as: Tag2 = "nav", ...props }, ref) => /* @__PURE__ */ jsx19(Tag2, { ref, className: cn("aviala-anchor", className), ...props })
2181
2686
  );
2182
2687
  Anchor2.displayName = "Anchor";
2183
- var AnchorItem = forwardRef14(
2688
+ var AnchorItem = forwardRef18(
2184
2689
  ({
2185
2690
  className,
2186
2691
  activated = false,
@@ -2190,17 +2695,17 @@ var AnchorItem = forwardRef14(
2190
2695
  ...props
2191
2696
  }, ref) => {
2192
2697
  const Comp = asChild ? Slot4 : "a";
2193
- return /* @__PURE__ */ jsxs10(
2698
+ return /* @__PURE__ */ jsxs13(
2194
2699
  Comp,
2195
2700
  {
2196
2701
  ref,
2197
- className: cn("aviala-anchor-item", className),
2702
+ className: cn("aviala-anchor-item aviala-focus-ring", className),
2198
2703
  "data-activated": activated ? "true" : "false",
2199
2704
  "data-indent": String(indentLevel),
2200
2705
  ...props,
2201
2706
  children: [
2202
- /* @__PURE__ */ jsx15("span", { className: "aviala-anchor-item__rail", "aria-hidden": true }),
2203
- /* @__PURE__ */ jsx15("span", { className: "aviala-anchor-item__content", children: /* @__PURE__ */ jsx15(Typography, { level: "text", as: "span", className: "aviala-anchor-item__label", children }) })
2707
+ /* @__PURE__ */ jsx19("span", { className: "aviala-anchor-item__rail", "aria-hidden": true }),
2708
+ /* @__PURE__ */ jsx19("span", { className: "aviala-anchor-item__content", children: /* @__PURE__ */ jsx19(Typography, { level: "text", as: "span", className: "aviala-anchor-item__label", children }) })
2204
2709
  ]
2205
2710
  }
2206
2711
  );
@@ -2211,7 +2716,7 @@ AnchorItem.displayName = "AnchorItem";
2211
2716
  // src/components/segmentator.tsx
2212
2717
  import {
2213
2718
  createContext as createContext3,
2214
- forwardRef as forwardRef15,
2719
+ forwardRef as forwardRef19,
2215
2720
  useCallback as useCallback3,
2216
2721
  useContext as useContext3,
2217
2722
  useEffect as useEffect2,
@@ -2219,7 +2724,7 @@ import {
2219
2724
  useRef as useRef2,
2220
2725
  useState as useState5
2221
2726
  } from "react";
2222
- import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
2727
+ import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
2223
2728
  var SegmentatorContext = createContext3(null);
2224
2729
  function useSegmentatorContext() {
2225
2730
  const ctx = useContext3(SegmentatorContext);
@@ -2234,7 +2739,7 @@ function renderIcon5(node, dimmed) {
2234
2739
  level: "text",
2235
2740
  biggerSize: true
2236
2741
  });
2237
- return /* @__PURE__ */ jsx16(
2742
+ return /* @__PURE__ */ jsx20(
2238
2743
  "span",
2239
2744
  {
2240
2745
  className: cn(
@@ -2510,7 +3015,7 @@ function useSegmentatorThumb(groupRef, selectedValue, layoutKey, dragState) {
2510
3015
  }, [layoutKey, remeasureThumb]);
2511
3016
  return { thumb, onThumbRef, measureThumb, applyThumbImmediate: syncThumb };
2512
3017
  }
2513
- var SegmentatorGroup = forwardRef15(
3018
+ var SegmentatorGroup = forwardRef19(
2514
3019
  ({
2515
3020
  className,
2516
3021
  value,
@@ -2649,7 +3154,7 @@ var SegmentatorGroup = forwardRef15(
2649
3154
  group.setPointerCapture(event.pointerId);
2650
3155
  };
2651
3156
  const thumbStyle = thumb ? buildThumbStyle(thumb) : void 0;
2652
- return /* @__PURE__ */ jsx16(
3157
+ return /* @__PURE__ */ jsx20(
2653
3158
  SegmentatorContext.Provider,
2654
3159
  {
2655
3160
  value: {
@@ -2662,7 +3167,7 @@ var SegmentatorGroup = forwardRef15(
2662
3167
  dragPreviewValue,
2663
3168
  isPressing: dragState.pressing
2664
3169
  },
2665
- children: /* @__PURE__ */ jsxs11(
3170
+ children: /* @__PURE__ */ jsxs14(
2666
3171
  "div",
2667
3172
  {
2668
3173
  ref: (node) => {
@@ -2670,7 +3175,7 @@ var SegmentatorGroup = forwardRef15(
2670
3175
  if (typeof ref === "function") ref(node);
2671
3176
  else if (ref) ref.current = node;
2672
3177
  },
2673
- role: "group",
3178
+ role: "radiogroup",
2674
3179
  ...props,
2675
3180
  className: cn("aviala-segmentator-group", className),
2676
3181
  "data-all-round": allRound ? "true" : "false",
@@ -2682,7 +3187,7 @@ var SegmentatorGroup = forwardRef15(
2682
3187
  onPointerCancel: finishPointerDrag,
2683
3188
  children: [
2684
3189
  children,
2685
- thumb && /* @__PURE__ */ jsx16(
3190
+ thumb && /* @__PURE__ */ jsx20(
2686
3191
  "span",
2687
3192
  {
2688
3193
  ref: onThumbRef,
@@ -2702,7 +3207,7 @@ var SegmentatorGroup = forwardRef15(
2702
3207
  }
2703
3208
  );
2704
3209
  SegmentatorGroup.displayName = "SegmentatorGroup";
2705
- var SegmentatorItem = forwardRef15(
3210
+ var SegmentatorItem = forwardRef19(
2706
3211
  ({
2707
3212
  className,
2708
3213
  value,
@@ -2720,7 +3225,7 @@ var SegmentatorItem = forwardRef15(
2720
3225
  const isDisabled = disabled || ctx.disabled;
2721
3226
  const dimmed = isDisabled;
2722
3227
  const icon = iconOnly ? leftIcon ?? rightIcon : leftIcon;
2723
- return /* @__PURE__ */ jsxs11(
3228
+ return /* @__PURE__ */ jsxs14(
2724
3229
  "button",
2725
3230
  {
2726
3231
  ref,
@@ -2733,7 +3238,7 @@ var SegmentatorItem = forwardRef15(
2733
3238
  "data-drag-preview": ctx.isPressing && ctx.dragPreviewValue === value ? "true" : void 0,
2734
3239
  "data-all-round": ctx.allRound ? "true" : "false",
2735
3240
  disabled: isDisabled,
2736
- className: cn("aviala-segmentator-item", iconOnly && "min-w-0", className),
3241
+ className: cn("aviala-segmentator-item aviala-focus-ring", iconOnly && "min-w-0", className),
2737
3242
  onClick: (e) => {
2738
3243
  if (ctx.consumeClickRef.current) {
2739
3244
  ctx.consumeClickRef.current = false;
@@ -2745,7 +3250,7 @@ var SegmentatorItem = forwardRef15(
2745
3250
  ...props,
2746
3251
  children: [
2747
3252
  renderIcon5(icon, dimmed && !!icon),
2748
- !iconOnly && /* @__PURE__ */ jsx16(
3253
+ !iconOnly && /* @__PURE__ */ jsx20(
2749
3254
  "span",
2750
3255
  {
2751
3256
  className: cn(
@@ -2765,26 +3270,26 @@ var SegmentatorItem = forwardRef15(
2765
3270
  SegmentatorItem.displayName = "SegmentatorItem";
2766
3271
 
2767
3272
  // src/components/form-field.tsx
2768
- import { forwardRef as forwardRef16 } from "react";
2769
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
2770
- var FormField = forwardRef16(
2771
- ({ className, label, htmlFor, description, error, required, children, ...props }, ref) => /* @__PURE__ */ jsxs12("div", { ref, className: cn("grid gap-[var(--gap-inside,4px)]", className), ...props, children: [
2772
- label ? /* @__PURE__ */ jsxs12(Label2, { htmlFor, children: [
3273
+ import { forwardRef as forwardRef20 } from "react";
3274
+ import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
3275
+ var FormField = forwardRef20(
3276
+ ({ className, label, htmlFor, description, error, required, children, ...props }, ref) => /* @__PURE__ */ jsxs15("div", { ref, className: cn("grid gap-[var(--gap-inside,4px)]", className), ...props, children: [
3277
+ label ? /* @__PURE__ */ jsxs15(Label2, { htmlFor, children: [
2773
3278
  label,
2774
- required ? /* @__PURE__ */ jsx17("span", { className: "text-destructive ml-0.5", children: "*" }) : null
3279
+ required ? /* @__PURE__ */ jsx21("span", { className: "text-destructive ml-0.5", children: "*" }) : null
2775
3280
  ] }) : null,
2776
3281
  children,
2777
- description && !error ? /* @__PURE__ */ jsx17(Typography, { level: "caption", as: "p", children: description }) : null,
2778
- error ? /* @__PURE__ */ jsx17(Typography, { level: "caption", as: "p", className: "text-destructive", children: error }) : null
3282
+ description && !error ? /* @__PURE__ */ jsx21(Typography, { level: "caption", as: "p", children: description }) : null,
3283
+ error ? /* @__PURE__ */ jsx21(Typography, { level: "caption", as: "p", className: "text-destructive", children: error }) : null
2779
3284
  ] })
2780
3285
  );
2781
3286
  FormField.displayName = "FormField";
2782
3287
 
2783
3288
  // src/components/input-group.tsx
2784
- import { forwardRef as forwardRef17 } from "react";
2785
- import { jsx as jsx18 } from "react/jsx-runtime";
2786
- var InputGroup = forwardRef17(
2787
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx18(
3289
+ import { forwardRef as forwardRef21 } from "react";
3290
+ import { jsx as jsx22 } from "react/jsx-runtime";
3291
+ var InputGroup = forwardRef21(
3292
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx22(
2788
3293
  "div",
2789
3294
  {
2790
3295
  ref,
@@ -2798,7 +3303,7 @@ var InputGroup = forwardRef17(
2798
3303
  )
2799
3304
  );
2800
3305
  InputGroup.displayName = "InputGroup";
2801
- var InputGroupAddon = forwardRef17(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
3306
+ var InputGroupAddon = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
2802
3307
  "div",
2803
3308
  {
2804
3309
  ref,
@@ -2813,8 +3318,8 @@ var InputGroupAddon = forwardRef17(({ className, ...props }, ref) => /* @__PURE_
2813
3318
  InputGroupAddon.displayName = "InputGroupAddon";
2814
3319
 
2815
3320
  // src/components/stack.tsx
2816
- import { forwardRef as forwardRef18 } from "react";
2817
- import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
3321
+ import { forwardRef as forwardRef22 } from "react";
3322
+ import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
2818
3323
  var gapMap = {
2819
3324
  inside: "var(--gap-inside, 4px)",
2820
3325
  component: "var(--gap-component, 8px)",
@@ -2822,8 +3327,8 @@ var gapMap = {
2822
3327
  block: "var(--gap-block, 14px)",
2823
3328
  page: "var(--gap-page-space, 24px)"
2824
3329
  };
2825
- var Stack = forwardRef18(
2826
- ({ className, gap = "component", direction = "column", style, ...props }, ref) => /* @__PURE__ */ jsx19(
3330
+ var Stack = forwardRef22(
3331
+ ({ className, gap = "component", direction = "column", style, ...props }, ref) => /* @__PURE__ */ jsx23(
2827
3332
  "div",
2828
3333
  {
2829
3334
  ref,
@@ -2834,7 +3339,7 @@ var Stack = forwardRef18(
2834
3339
  )
2835
3340
  );
2836
3341
  Stack.displayName = "Stack";
2837
- var Fieldset = forwardRef18(({ className, legend, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
3342
+ var Fieldset = forwardRef22(({ className, legend, children, ...props }, ref) => /* @__PURE__ */ jsxs16(
2838
3343
  "fieldset",
2839
3344
  {
2840
3345
  ref,
@@ -2844,7 +3349,7 @@ var Fieldset = forwardRef18(({ className, legend, children, ...props }, ref) =>
2844
3349
  ),
2845
3350
  ...props,
2846
3351
  children: [
2847
- legend ? /* @__PURE__ */ jsx19("legend", { className: cn("px-1", typographyVariants({ level: "text" })), children: legend }) : null,
3352
+ legend ? /* @__PURE__ */ jsx23("legend", { className: cn("px-1", typographyVariants({ level: "text" })), children: legend }) : null,
2848
3353
  children
2849
3354
  ]
2850
3355
  }
@@ -2854,7 +3359,7 @@ Fieldset.displayName = "Fieldset";
2854
3359
  // src/components/color-picker/color-picker.tsx
2855
3360
  import * as PopoverPrimitive2 from "@radix-ui/react-popover";
2856
3361
  import {
2857
- forwardRef as forwardRef20,
3362
+ forwardRef as forwardRef24,
2858
3363
  useState as useState8
2859
3364
  } from "react";
2860
3365
 
@@ -3017,7 +3522,7 @@ function useColorPickerState({
3017
3522
  }
3018
3523
 
3019
3524
  // src/components/color-picker/color-picker-area.tsx
3020
- import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
3525
+ import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
3021
3526
  function ColorPickerArea({
3022
3527
  className,
3023
3528
  disabled,
@@ -3049,11 +3554,11 @@ function ColorPickerArea({
3049
3554
  );
3050
3555
  const { handlePointerDown, handlePointerMove } = usePointerDrag(ref, handleMove, !isDisabled);
3051
3556
  const hueColor = pureHueHex(hsva.h);
3052
- return /* @__PURE__ */ jsx20("div", { className: cn("aviala-color-picker-area", className), ...spiralDebugId("color-picker.content.area"), children: /* @__PURE__ */ jsxs14(
3557
+ return /* @__PURE__ */ jsx24("div", { className: cn("aviala-color-picker-area", className), ...spiralDebugId("color-picker.content.area"), children: /* @__PURE__ */ jsxs17(
3053
3558
  "div",
3054
3559
  {
3055
3560
  ref,
3056
- className: "aviala-color-picker-area__surface",
3561
+ className: "aviala-color-picker-area__surface aviala-focus-ring",
3057
3562
  style: { backgroundColor: hueColor },
3058
3563
  onPointerDown: handlePointerDown,
3059
3564
  onPointerMove: handlePointerMove,
@@ -3064,9 +3569,9 @@ function ColorPickerArea({
3064
3569
  "aria-valuenow": Math.round(hsva.s),
3065
3570
  tabIndex: isDisabled ? -1 : 0,
3066
3571
  children: [
3067
- /* @__PURE__ */ jsx20("div", { className: "aviala-color-picker-area__white", "aria-hidden": true }),
3068
- /* @__PURE__ */ jsx20("div", { className: "aviala-color-picker-area__black", "aria-hidden": true }),
3069
- /* @__PURE__ */ jsx20(
3572
+ /* @__PURE__ */ jsx24("div", { className: "aviala-color-picker-area__white", "aria-hidden": true }),
3573
+ /* @__PURE__ */ jsx24("div", { className: "aviala-color-picker-area__black", "aria-hidden": true }),
3574
+ /* @__PURE__ */ jsx24(
3070
3575
  "div",
3071
3576
  {
3072
3577
  className: "aviala-color-picker-area__thumb",
@@ -3085,7 +3590,7 @@ function ColorPickerArea({
3085
3590
  // src/components/color-picker/color-picker-inputs.tsx
3086
3591
  import { EditColorPicker } from "@aviala-design/icons";
3087
3592
  import { useCallback as useCallback7, useEffect as useEffect3, useState as useState7 } from "react";
3088
- import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
3593
+ import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
3089
3594
  function ColorPickerInputs({
3090
3595
  className,
3091
3596
  disabled,
@@ -3145,8 +3650,8 @@ function ColorPickerInputs({
3145
3650
  } catch {
3146
3651
  }
3147
3652
  }, [eyeDropperSupported, isDisabled, setValue]);
3148
- return /* @__PURE__ */ jsxs15("div", { className: cn("aviala-color-picker-inputs", className), ...spiralDebugId("color-picker.content.inputs"), children: [
3149
- showEyedropper ? /* @__PURE__ */ jsx21(
3653
+ return /* @__PURE__ */ jsxs18("div", { className: cn("aviala-color-picker-inputs", className), ...spiralDebugId("color-picker.content.inputs"), children: [
3654
+ showEyedropper ? /* @__PURE__ */ jsx25(
3150
3655
  Button,
3151
3656
  {
3152
3657
  type: "button",
@@ -3158,12 +3663,12 @@ function ColorPickerInputs({
3158
3663
  ...spiralDebugId("color-picker.content.inputs.eyedropper"),
3159
3664
  title: eyeDropperSupported ? "Pick color from screen" : "EyeDropper not supported in this browser",
3160
3665
  onClick: handleEyedropper,
3161
- children: /* @__PURE__ */ jsx21(EditColorPicker, { "aria-hidden": true })
3666
+ children: /* @__PURE__ */ jsx25(EditColorPicker, { "aria-hidden": true })
3162
3667
  }
3163
3668
  ) : null,
3164
- format === "hex" ? /* @__PURE__ */ jsxs15("div", { className: "aviala-color-picker-field", children: [
3165
- /* @__PURE__ */ jsx21("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx21(Badge, { children: "#" }) }),
3166
- /* @__PURE__ */ jsx21(
3669
+ format === "hex" ? /* @__PURE__ */ jsxs18("div", { className: "aviala-color-picker-field", children: [
3670
+ /* @__PURE__ */ jsx25("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx25(Badge, { children: "#" }) }),
3671
+ /* @__PURE__ */ jsx25(
3167
3672
  "input",
3168
3673
  {
3169
3674
  className: cn("aviala-color-picker-field__input", typographyVariants({ level: "text" })),
@@ -3175,7 +3680,7 @@ function ColorPickerInputs({
3175
3680
  onKeyDown: (e) => e.key === "Enter" && commitHex()
3176
3681
  }
3177
3682
  )
3178
- ] }) : /* @__PURE__ */ jsx21("div", { className: "aviala-color-picker-field", children: /* @__PURE__ */ jsx21(
3683
+ ] }) : /* @__PURE__ */ jsx25("div", { className: "aviala-color-picker-field", children: /* @__PURE__ */ jsx25(
3179
3684
  "input",
3180
3685
  {
3181
3686
  className: cn("aviala-color-picker-field__input", typographyVariants({ level: "text" })),
@@ -3187,8 +3692,8 @@ function ColorPickerInputs({
3187
3692
  onKeyDown: (e) => e.key === "Enter" && commitComponents()
3188
3693
  }
3189
3694
  ) }),
3190
- /* @__PURE__ */ jsxs15("div", { className: "aviala-color-picker-field aviala-color-picker-field--alpha", children: [
3191
- /* @__PURE__ */ jsx21(
3695
+ /* @__PURE__ */ jsxs18("div", { className: "aviala-color-picker-field aviala-color-picker-field--alpha", children: [
3696
+ /* @__PURE__ */ jsx25(
3192
3697
  "input",
3193
3698
  {
3194
3699
  className: cn("aviala-color-picker-field__input", typographyVariants({ level: "text" })),
@@ -3201,20 +3706,20 @@ function ColorPickerInputs({
3201
3706
  onKeyDown: (e) => e.key === "Enter" && commitAlpha()
3202
3707
  }
3203
3708
  ),
3204
- /* @__PURE__ */ jsx21("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx21(Badge, { children: "%" }) })
3709
+ /* @__PURE__ */ jsx25("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx25(Badge, { children: "%" }) })
3205
3710
  ] }),
3206
- /* @__PURE__ */ jsxs15(
3711
+ /* @__PURE__ */ jsxs18(
3207
3712
  Select,
3208
3713
  {
3209
3714
  value: format,
3210
3715
  onValueChange: (next) => setFormat(next),
3211
3716
  disabled: isDisabled,
3212
3717
  children: [
3213
- /* @__PURE__ */ jsx21(SelectTrigger, { className: "aviala-color-picker-format-select w-[76px] shrink-0", size: "regular", children: /* @__PURE__ */ jsx21(SelectValue, {}) }),
3214
- /* @__PURE__ */ jsx21(SelectContent, { onCloseAutoFocus: (event) => event.preventDefault(), children: /* @__PURE__ */ jsxs15(SelectItemGroup, { children: [
3215
- /* @__PURE__ */ jsx21(SelectItem, { value: "hex", itemFunction: "radio", children: "HEX" }),
3216
- /* @__PURE__ */ jsx21(SelectItem, { value: "rgb", itemFunction: "radio", children: "RGB" }),
3217
- /* @__PURE__ */ jsx21(SelectItem, { value: "hsl", itemFunction: "radio", children: "HSL" })
3718
+ /* @__PURE__ */ jsx25(SelectTrigger, { className: "aviala-color-picker-format-select w-[76px] shrink-0", size: "regular", children: /* @__PURE__ */ jsx25(SelectValue, {}) }),
3719
+ /* @__PURE__ */ jsx25(SelectContent, { onCloseAutoFocus: (event) => event.preventDefault(), children: /* @__PURE__ */ jsxs18(SelectItemGroup, { children: [
3720
+ /* @__PURE__ */ jsx25(SelectItem, { value: "hex", itemFunction: "radio", children: "HEX" }),
3721
+ /* @__PURE__ */ jsx25(SelectItem, { value: "rgb", itemFunction: "radio", children: "RGB" }),
3722
+ /* @__PURE__ */ jsx25(SelectItem, { value: "hsl", itemFunction: "radio", children: "HSL" })
3218
3723
  ] }) })
3219
3724
  ]
3220
3725
  }
@@ -3237,21 +3742,21 @@ function buildComponentDraft(value, format) {
3237
3742
  import { SymbolAdd } from "@aviala-design/icons";
3238
3743
 
3239
3744
  // src/components/color-picker/color-pick-button.tsx
3240
- import { forwardRef as forwardRef19 } from "react";
3241
- import { jsx as jsx22 } from "react/jsx-runtime";
3242
- var ColorPickButton = forwardRef19(
3745
+ import { forwardRef as forwardRef23 } from "react";
3746
+ import { jsx as jsx26 } from "react/jsx-runtime";
3747
+ var ColorPickButton = forwardRef23(
3243
3748
  ({ className, color, selected = false, style, ...props }, ref) => {
3244
3749
  const swatch = parseColor(color).toHex();
3245
- return /* @__PURE__ */ jsx22(
3750
+ return /* @__PURE__ */ jsx26(
3246
3751
  "button",
3247
3752
  {
3248
3753
  ref,
3249
3754
  type: "button",
3250
- className: cn("aviala-color-pick-button", className),
3755
+ className: cn("aviala-color-pick-button aviala-focus-ring", className),
3251
3756
  "data-selected": selected ? "true" : void 0,
3252
3757
  style,
3253
3758
  ...props,
3254
- children: /* @__PURE__ */ jsx22(
3759
+ children: /* @__PURE__ */ jsx26(
3255
3760
  "span",
3256
3761
  {
3257
3762
  className: "aviala-color-pick-button__swatch",
@@ -3266,7 +3771,7 @@ var ColorPickButton = forwardRef19(
3266
3771
  ColorPickButton.displayName = "ColorPickButton";
3267
3772
 
3268
3773
  // src/components/color-picker/color-picker-presets.tsx
3269
- import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
3774
+ import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
3270
3775
  function ColorPickerPresets({
3271
3776
  className,
3272
3777
  presets: presetsProp,
@@ -3288,8 +3793,8 @@ function ColorPickerPresets({
3288
3793
  const next = [...presets, normalized].slice(-maxPresets);
3289
3794
  onPresetsChange(next);
3290
3795
  };
3291
- return /* @__PURE__ */ jsxs16("div", { className: cn("aviala-color-picker-presets", className), ...spiralDebugId("color-picker.content.presets"), children: [
3292
- /* @__PURE__ */ jsx23(
3796
+ return /* @__PURE__ */ jsxs19("div", { className: cn("aviala-color-picker-presets", className), ...spiralDebugId("color-picker.content.presets"), children: [
3797
+ /* @__PURE__ */ jsx27(
3293
3798
  Button,
3294
3799
  {
3295
3800
  type: "button",
@@ -3299,10 +3804,10 @@ function ColorPickerPresets({
3299
3804
  disabled: isDisabled || !onPresetsChange || presets.length >= maxPresets,
3300
3805
  "aria-label": "Add current color to presets",
3301
3806
  onClick: handleAdd,
3302
- children: /* @__PURE__ */ jsx23(SymbolAdd, { "aria-hidden": true })
3807
+ children: /* @__PURE__ */ jsx27(SymbolAdd, { "aria-hidden": true })
3303
3808
  }
3304
3809
  ),
3305
- presets.map((color) => /* @__PURE__ */ jsx23(
3810
+ presets.map((color) => /* @__PURE__ */ jsx27(
3306
3811
  ColorPickButton,
3307
3812
  {
3308
3813
  color,
@@ -3317,7 +3822,7 @@ function ColorPickerPresets({
3317
3822
 
3318
3823
  // src/components/color-picker/color-picker-slider.tsx
3319
3824
  import { useCallback as useCallback8, useRef as useRef4 } from "react";
3320
- import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
3825
+ import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
3321
3826
  function ColorPickerSlider({
3322
3827
  kind,
3323
3828
  className,
@@ -3365,16 +3870,16 @@ function ColorPickerSlider({
3365
3870
  backgroundImage: `linear-gradient(90deg, transparent, ${solidHex(value)})`,
3366
3871
  backgroundColor: "var(--color-picker-checkerboard)"
3367
3872
  };
3368
- return /* @__PURE__ */ jsx24(
3873
+ return /* @__PURE__ */ jsx28(
3369
3874
  "div",
3370
3875
  {
3371
3876
  className: cn("aviala-color-picker-slider-row", className),
3372
3877
  ...spiralDebugId(`color-picker.content.${kind}-slider`),
3373
- children: /* @__PURE__ */ jsxs17(
3878
+ children: /* @__PURE__ */ jsxs20(
3374
3879
  "div",
3375
3880
  {
3376
3881
  ref,
3377
- className: "aviala-color-picker-slider",
3882
+ className: "aviala-color-picker-slider aviala-focus-ring",
3378
3883
  onPointerDown: handlePointerDown,
3379
3884
  onPointerMove: handlePointerMove,
3380
3885
  role: "slider",
@@ -3384,8 +3889,8 @@ function ColorPickerSlider({
3384
3889
  "aria-valuenow": ariaValueNow,
3385
3890
  tabIndex: isDisabled ? -1 : 0,
3386
3891
  children: [
3387
- /* @__PURE__ */ jsx24("div", { className: "aviala-color-picker-slider__track", style: trackStyle }),
3388
- /* @__PURE__ */ jsx24(
3892
+ /* @__PURE__ */ jsx28("div", { className: "aviala-color-picker-slider__track", style: trackStyle }),
3893
+ /* @__PURE__ */ jsx28(
3389
3894
  "div",
3390
3895
  {
3391
3896
  className: "aviala-color-picker-slider__thumb",
@@ -3401,7 +3906,7 @@ function ColorPickerSlider({
3401
3906
  }
3402
3907
 
3403
3908
  // src/components/color-picker/color-picker.tsx
3404
- import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
3909
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
3405
3910
  function ColorPicker({
3406
3911
  children,
3407
3912
  className,
@@ -3444,22 +3949,22 @@ function ColorPicker({
3444
3949
  onPresetsChange,
3445
3950
  maxPresets
3446
3951
  };
3447
- return /* @__PURE__ */ jsx25(ColorPickerContextProvider, { value: contextValue, children: /* @__PURE__ */ jsx25(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx25("div", { className: cn("inline-flex", className), ...spiralDebugId("color-picker"), children }) }) });
3952
+ return /* @__PURE__ */ jsx29(ColorPickerContextProvider, { value: contextValue, children: /* @__PURE__ */ jsx29(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx29("div", { className: cn("inline-flex", className), ...spiralDebugId("color-picker"), children }) }) });
3448
3953
  }
3449
3954
  function ColorPickerContextProvider({
3450
3955
  value,
3451
3956
  children
3452
3957
  }) {
3453
- return /* @__PURE__ */ jsx25(ColorPickerContext.Provider, { value, children });
3958
+ return /* @__PURE__ */ jsx29(ColorPickerContext.Provider, { value, children });
3454
3959
  }
3455
- var ColorPickerTrigger = forwardRef20(({ className, size = "regular", allRound = false, placeholder = "Select color", ...props }, ref) => {
3960
+ var ColorPickerTrigger = forwardRef24(({ className, size = "regular", allRound = false, placeholder = "Select color", ...props }, ref) => {
3456
3961
  const { value, open, disabled } = useColorPickerContext();
3457
- return /* @__PURE__ */ jsx25(PopoverPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs18(
3962
+ return /* @__PURE__ */ jsx29(PopoverPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs21(
3458
3963
  "button",
3459
3964
  {
3460
3965
  ref,
3461
3966
  type: "button",
3462
- className: cn("aviala-color-picker-trigger", className),
3967
+ className: cn("aviala-color-picker-trigger aviala-focus-ring", className),
3463
3968
  ...spiralDebugId("color-picker.trigger"),
3464
3969
  "data-size": size,
3465
3970
  "data-all-round": allRound ? "true" : "false",
@@ -3468,7 +3973,7 @@ var ColorPickerTrigger = forwardRef20(({ className, size = "regular", allRound =
3468
3973
  disabled,
3469
3974
  ...props,
3470
3975
  children: [
3471
- /* @__PURE__ */ jsx25("span", { className: "aviala-color-picker-trigger__swatch", ...spiralDebugId("color-picker.trigger.swatch"), children: /* @__PURE__ */ jsx25(
3976
+ /* @__PURE__ */ jsx29("span", { className: "aviala-color-picker-trigger__swatch", ...spiralDebugId("color-picker.trigger.swatch"), children: /* @__PURE__ */ jsx29(
3472
3977
  "span",
3473
3978
  {
3474
3979
  className: "aviala-color-picker-trigger__swatch-inner",
@@ -3476,7 +3981,7 @@ var ColorPickerTrigger = forwardRef20(({ className, size = "regular", allRound =
3476
3981
  "aria-hidden": true
3477
3982
  }
3478
3983
  ) }),
3479
- /* @__PURE__ */ jsx25("span", { className: "aviala-color-picker-trigger__value", ...spiralDebugId("color-picker.trigger.value"), children: value ? value.replace(/^#/, "").slice(0, 6).toUpperCase() : /* @__PURE__ */ jsx25("span", { className: "aviala-color-picker-trigger__placeholder", children: placeholder }) })
3984
+ /* @__PURE__ */ jsx29("span", { className: "aviala-color-picker-trigger__value", ...spiralDebugId("color-picker.trigger.value"), children: value ? value.replace(/^#/, "").slice(0, 6).toUpperCase() : /* @__PURE__ */ jsx29("span", { className: "aviala-color-picker-trigger__placeholder", children: placeholder }) })
3480
3985
  ]
3481
3986
  }
3482
3987
  ) });
@@ -3485,7 +3990,7 @@ ColorPickerTrigger.displayName = "ColorPickerTrigger";
3485
3990
  function isWithinSelectLayer(target) {
3486
3991
  return target instanceof Element && (target.closest(".aviala-select-content") !== null || target.closest("[data-radix-select-viewport]") !== null);
3487
3992
  }
3488
- var ColorPickerContent = forwardRef20(
3993
+ var ColorPickerContent = forwardRef24(
3489
3994
  ({
3490
3995
  className,
3491
3996
  align = "start",
@@ -3495,7 +4000,7 @@ var ColorPickerContent = forwardRef20(
3495
4000
  ...props
3496
4001
  }, ref) => {
3497
4002
  const { presets, onPresetsChange, maxPresets, disabled } = useColorPickerContext();
3498
- return /* @__PURE__ */ jsx25(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx25(
4003
+ return /* @__PURE__ */ jsx29(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx29(
3499
4004
  PopoverPrimitive2.Content,
3500
4005
  {
3501
4006
  ref,
@@ -3511,12 +4016,12 @@ var ColorPickerContent = forwardRef20(
3511
4016
  },
3512
4017
  onFocusOutside: (event) => event.preventDefault(),
3513
4018
  ...props,
3514
- children: /* @__PURE__ */ jsxs18("div", { className: "aviala-color-picker-panel", children: [
3515
- /* @__PURE__ */ jsx25(ColorPickerArea, { disabled }),
3516
- /* @__PURE__ */ jsx25(ColorPickerSlider, { kind: "hue", disabled }),
3517
- /* @__PURE__ */ jsx25(ColorPickerSlider, { kind: "alpha", disabled }),
3518
- /* @__PURE__ */ jsx25(ColorPickerInputs, { disabled, showEyedropper }),
3519
- showPresets ? /* @__PURE__ */ jsx25(
4019
+ children: /* @__PURE__ */ jsxs21("div", { className: "aviala-color-picker-panel", children: [
4020
+ /* @__PURE__ */ jsx29(ColorPickerArea, { disabled }),
4021
+ /* @__PURE__ */ jsx29(ColorPickerSlider, { kind: "hue", disabled }),
4022
+ /* @__PURE__ */ jsx29(ColorPickerSlider, { kind: "alpha", disabled }),
4023
+ /* @__PURE__ */ jsx29(ColorPickerInputs, { disabled, showEyedropper }),
4024
+ showPresets ? /* @__PURE__ */ jsx29(
3520
4025
  ColorPickerPresets,
3521
4026
  {
3522
4027
  disabled,
@@ -3533,7 +4038,7 @@ var ColorPickerContent = forwardRef20(
3533
4038
  ColorPickerContent.displayName = "ColorPickerContent";
3534
4039
 
3535
4040
  // src/components/color-picker/color-picker-panel.tsx
3536
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
4041
+ import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
3537
4042
  function ColorPickerPanel({
3538
4043
  className,
3539
4044
  disabled,
@@ -3565,12 +4070,12 @@ function ColorPickerPanel({
3565
4070
  onPresetsChange,
3566
4071
  maxPresets
3567
4072
  };
3568
- return /* @__PURE__ */ jsx26(ColorPickerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs19("div", { className: cn("aviala-color-picker-panel", className), children: [
3569
- /* @__PURE__ */ jsx26(ColorPickerArea, { disabled }),
3570
- /* @__PURE__ */ jsx26(ColorPickerSlider, { kind: "hue", disabled }),
3571
- /* @__PURE__ */ jsx26(ColorPickerSlider, { kind: "alpha", disabled }),
3572
- /* @__PURE__ */ jsx26(ColorPickerInputs, { disabled, showEyedropper }),
3573
- showPresets ? /* @__PURE__ */ jsx26(
4073
+ return /* @__PURE__ */ jsx30(ColorPickerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs22("div", { className: cn("aviala-color-picker-panel", className), children: [
4074
+ /* @__PURE__ */ jsx30(ColorPickerArea, { disabled }),
4075
+ /* @__PURE__ */ jsx30(ColorPickerSlider, { kind: "hue", disabled }),
4076
+ /* @__PURE__ */ jsx30(ColorPickerSlider, { kind: "alpha", disabled }),
4077
+ /* @__PURE__ */ jsx30(ColorPickerInputs, { disabled, showEyedropper }),
4078
+ showPresets ? /* @__PURE__ */ jsx30(
3574
4079
  ColorPickerPresets,
3575
4080
  {
3576
4081
  disabled,
@@ -3591,8 +4096,8 @@ import {
3591
4096
  } from "@aviala-design/icons";
3592
4097
  import {
3593
4098
  createContext as createContext5,
3594
- forwardRef as forwardRef21,
3595
- isValidElement as isValidElement9,
4099
+ forwardRef as forwardRef25,
4100
+ isValidElement as isValidElement11,
3596
4101
  useCallback as useCallback9,
3597
4102
  useContext as useContext5,
3598
4103
  useEffect as useEffect4,
@@ -3601,7 +4106,7 @@ import {
3601
4106
  useRef as useRef5,
3602
4107
  useState as useState9
3603
4108
  } from "react";
3604
- import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
4109
+ import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
3605
4110
  var CascaderContext = createContext5(null);
3606
4111
  function useCascaderContext() {
3607
4112
  const context = useContext5(CascaderContext);
@@ -3616,7 +4121,7 @@ function renderSlotIcon4(node, debugId) {
3616
4121
  level: "text",
3617
4122
  biggerSize: true
3618
4123
  });
3619
- return /* @__PURE__ */ jsx27(
4124
+ return /* @__PURE__ */ jsx31(
3620
4125
  "span",
3621
4126
  {
3622
4127
  className: "aviala-cascader-trigger__slot",
@@ -3632,7 +4137,7 @@ function renderItemIcon2(node, iconLevel = "text", debugId) {
3632
4137
  level: iconLevel,
3633
4138
  biggerSize: true
3634
4139
  });
3635
- return /* @__PURE__ */ jsx27(
4140
+ return /* @__PURE__ */ jsx31(
3636
4141
  "span",
3637
4142
  {
3638
4143
  className: cn(
@@ -3647,16 +4152,16 @@ function renderItemIcon2(node, iconLevel = "text", debugId) {
3647
4152
  }
3648
4153
  function renderBadgeSlot2(node) {
3649
4154
  if (node == null || node === false) return null;
3650
- return /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__badge", children: isValidElement9(node) && node.type === Badge ? node : /* @__PURE__ */ jsx27(Badge, { children: node }) });
4155
+ return /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__badge", children: isValidElement11(node) && node.type === Badge ? node : /* @__PURE__ */ jsx31(Badge, { children: node }) });
3651
4156
  }
3652
4157
  function CascaderItemFormRadio() {
3653
- return /* @__PURE__ */ jsxs20("span", { className: "aviala-cascader-item__form-radio", "aria-hidden": true, children: [
3654
- /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__form-radio-surface" }),
3655
- /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__form-radio-indicator" })
4158
+ return /* @__PURE__ */ jsxs23("span", { className: "aviala-cascader-item__form-radio", "aria-hidden": true, children: [
4159
+ /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__form-radio-surface" }),
4160
+ /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__form-radio-indicator" })
3656
4161
  ] });
3657
4162
  }
3658
4163
  function CascaderItemFormCheckbox() {
3659
- return /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__form-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx27(
4164
+ return /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__form-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx31(
3660
4165
  SymbolRight3,
3661
4166
  {
3662
4167
  className: "aviala-cascader-item__form-checkbox-icon",
@@ -3669,27 +4174,27 @@ function CascaderItemFormCheckbox() {
3669
4174
  }
3670
4175
  function CascaderItemTrailingRadio({ selected }) {
3671
4176
  if (!selected) return null;
3672
- return /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__trailing-radio", "aria-hidden": true, children: /* @__PURE__ */ jsx27(SymbolRight3, { level: "text", biggerSize: true, "aria-hidden": true }) });
4177
+ return /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__trailing-radio", "aria-hidden": true, children: /* @__PURE__ */ jsx31(SymbolRight3, { level: "text", biggerSize: true, "aria-hidden": true }) });
3673
4178
  }
3674
4179
  function CascaderItemTrailingCheckbox({ selected }) {
3675
4180
  if (!selected) return null;
3676
- return /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__trailing-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx27(SymbolRight3, { level: "text", biggerSize: true, "aria-hidden": true }) });
4181
+ return /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__trailing-checkbox", "aria-hidden": true, children: /* @__PURE__ */ jsx31(SymbolRight3, { level: "text", biggerSize: true, "aria-hidden": true }) });
3677
4182
  }
3678
4183
  function renderFunctionSlot2(itemFunction, layout, showFunctionIcon, hasChildren, selected, icon) {
3679
4184
  if (!showFunctionIcon || layout === "title") return null;
3680
4185
  if (icon !== void 0) {
3681
- return /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__function", children: icon });
4186
+ return /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__function", children: icon });
3682
4187
  }
3683
4188
  switch (itemFunction) {
3684
4189
  case "radio":
3685
- return /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__function", children: /* @__PURE__ */ jsx27(CascaderItemTrailingRadio, { selected }) });
4190
+ return /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__function", children: /* @__PURE__ */ jsx31(CascaderItemTrailingRadio, { selected }) });
3686
4191
  case "checkbox":
3687
- return /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-item__function", children: /* @__PURE__ */ jsx27(CascaderItemTrailingCheckbox, { selected }) });
4192
+ return /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-item__function", children: /* @__PURE__ */ jsx31(CascaderItemTrailingCheckbox, { selected }) });
3688
4193
  case "simple":
3689
4194
  default:
3690
- return /* @__PURE__ */ jsxs20("span", { className: "aviala-cascader-item__function", children: [
3691
- selected ? /* @__PURE__ */ jsx27(SymbolRight3, { level: "text", biggerSize: true, "aria-hidden": true }) : null,
3692
- hasChildren ? /* @__PURE__ */ jsx27(DirectionArrowRightLight, { level: "text", biggerSize: true, "aria-hidden": true }) : null
4195
+ return /* @__PURE__ */ jsxs23("span", { className: "aviala-cascader-item__function", children: [
4196
+ selected ? /* @__PURE__ */ jsx31(SymbolRight3, { level: "text", biggerSize: true, "aria-hidden": true }) : null,
4197
+ hasChildren ? /* @__PURE__ */ jsx31(DirectionArrowRightLight, { level: "text", biggerSize: true, "aria-hidden": true }) : null
3693
4198
  ] });
3694
4199
  }
3695
4200
  }
@@ -3838,9 +4343,9 @@ function Cascader({
3838
4343
  size
3839
4344
  ]
3840
4345
  );
3841
- return /* @__PURE__ */ jsx27(CascaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx27(PopoverPrimitive3.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx27("div", { className: cn("inline-flex", className), ...spiralDebugId("cascader"), children }) }) });
4346
+ return /* @__PURE__ */ jsx31(CascaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx31(PopoverPrimitive3.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx31("div", { className: cn("inline-flex", className), ...spiralDebugId("cascader"), children }) }) });
3842
4347
  }
3843
- var CascaderTrigger = forwardRef21(
4348
+ var CascaderTrigger = forwardRef25(
3844
4349
  ({
3845
4350
  className,
3846
4351
  size: sizeProp,
@@ -3859,17 +4364,17 @@ var CascaderTrigger = forwardRef21(
3859
4364
  const size = sizeProp ?? sizeContext;
3860
4365
  const disabled = disabledProp ?? disabledContext;
3861
4366
  const labels = selectedPath.map((_, index) => getOptionAtPath(selectedPath.slice(0, index + 1))?.label).filter((label) => label != null && label !== false);
3862
- const resolvedDisplay = displayValue ?? (labels.length > 0 ? labels.map((label, index) => /* @__PURE__ */ jsxs20("span", { children: [
4367
+ const resolvedDisplay = displayValue ?? (labels.length > 0 ? labels.map((label, index) => /* @__PURE__ */ jsxs23("span", { children: [
3863
4368
  index > 0 ? separator : null,
3864
4369
  label
3865
4370
  ] }, `${selectedPath[index]}-${index}`)) : null);
3866
4371
  const hasValue = resolvedDisplay != null && resolvedDisplay !== false;
3867
- return /* @__PURE__ */ jsx27(PopoverPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs20(
4372
+ return /* @__PURE__ */ jsx31(PopoverPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs23(
3868
4373
  "button",
3869
4374
  {
3870
4375
  ref,
3871
4376
  type: "button",
3872
- className: cn("aviala-cascader-trigger", className),
4377
+ className: cn("aviala-cascader-trigger aviala-focus-ring", className),
3873
4378
  "data-size": size,
3874
4379
  "data-all-round": allRound ? "true" : "false",
3875
4380
  "data-state": open ? "open" : "closed",
@@ -3881,7 +4386,7 @@ var CascaderTrigger = forwardRef21(
3881
4386
  ...props,
3882
4387
  children: [
3883
4388
  renderSlotIcon4(leftIcon, "cascader.trigger.icon-left"),
3884
- /* @__PURE__ */ jsx27("span", { className: "aviala-cascader-trigger__field", ...spiralDebugId("cascader.trigger.value"), children: /* @__PURE__ */ jsx27(
4389
+ /* @__PURE__ */ jsx31("span", { className: "aviala-cascader-trigger__field", ...spiralDebugId("cascader.trigger.value"), children: /* @__PURE__ */ jsx31(
3885
4390
  "span",
3886
4391
  {
3887
4392
  className: cn("aviala-cascader-trigger__value", typographyVariants({ level: "text" })),
@@ -3890,14 +4395,14 @@ var CascaderTrigger = forwardRef21(
3890
4395
  }
3891
4396
  ) }),
3892
4397
  renderSlotIcon4(rightIcon, "cascader.trigger.icon-right"),
3893
- /* @__PURE__ */ jsx27(
4398
+ /* @__PURE__ */ jsx31(
3894
4399
  "span",
3895
4400
  {
3896
4401
  className: "aviala-cascader-trigger__expand",
3897
4402
  "aria-hidden": true,
3898
4403
  style: expandIcon ? iconSlotCssVarStyle(expandIcon, "--input-slot-icon-size", "text", true) : iconLevelCssVarStyle("text", true, "--input-slot-icon-size"),
3899
4404
  ...spiralDebugId("cascader.trigger.expand"),
3900
- children: expandIcon ?? /* @__PURE__ */ jsx27(DirectionArrowDownLight2, { level: "text", biggerSize: true, "aria-hidden": true })
4405
+ children: expandIcon ?? /* @__PURE__ */ jsx31(DirectionArrowDownLight2, { level: "text", biggerSize: true, "aria-hidden": true })
3901
4406
  }
3902
4407
  )
3903
4408
  ]
@@ -3906,7 +4411,7 @@ var CascaderTrigger = forwardRef21(
3906
4411
  }
3907
4412
  );
3908
4413
  CascaderTrigger.displayName = "CascaderTrigger";
3909
- var CascaderContent = forwardRef21(
4414
+ var CascaderContent = forwardRef25(
3910
4415
  ({
3911
4416
  className,
3912
4417
  children,
@@ -3915,7 +4420,7 @@ var CascaderContent = forwardRef21(
3915
4420
  portalled = true,
3916
4421
  ...props
3917
4422
  }, ref) => {
3918
- const content = /* @__PURE__ */ jsx27(
4423
+ const content = /* @__PURE__ */ jsx31(
3919
4424
  PopoverPrimitive3.Content,
3920
4425
  {
3921
4426
  ref,
@@ -3928,15 +4433,15 @@ var CascaderContent = forwardRef21(
3928
4433
  }
3929
4434
  );
3930
4435
  if (!portalled) return content;
3931
- return /* @__PURE__ */ jsx27(PopoverPrimitive3.Portal, { children: content });
4436
+ return /* @__PURE__ */ jsx31(PopoverPrimitive3.Portal, { children: content });
3932
4437
  }
3933
4438
  );
3934
4439
  CascaderContent.displayName = "CascaderContent";
3935
- var CascaderMenu = forwardRef21(
3936
- ({ children, className }, ref) => /* @__PURE__ */ jsx27("div", { ref, className: cn("aviala-cascader-menu", className), children })
4440
+ var CascaderMenu = forwardRef25(
4441
+ ({ children, className }, ref) => /* @__PURE__ */ jsx31("div", { ref, className: cn("aviala-cascader-menu", className), children })
3937
4442
  );
3938
4443
  CascaderMenu.displayName = "CascaderMenu";
3939
- var CascaderColumn = forwardRef21(
4444
+ var CascaderColumn = forwardRef25(
3940
4445
  ({ children, className, animateEnter, animateExit, exitLayout }, ref) => {
3941
4446
  const animate = animateExit ? "exit" : animateEnter ? "enter" : void 0;
3942
4447
  const exitStyle = animateExit && exitLayout ? {
@@ -3947,14 +4452,14 @@ var CascaderColumn = forwardRef21(
3947
4452
  width: exitLayout.width,
3948
4453
  zIndex: 0
3949
4454
  } : void 0;
3950
- return /* @__PURE__ */ jsx27(
4455
+ return /* @__PURE__ */ jsx31(
3951
4456
  "div",
3952
4457
  {
3953
4458
  ref,
3954
4459
  className: cn("aviala-cascader-column", className),
3955
4460
  "data-animate": animate,
3956
4461
  style: exitStyle,
3957
- children: /* @__PURE__ */ jsx27("div", { className: "aviala-cascader-column__surface", "data-animate": animate, children })
4462
+ children: /* @__PURE__ */ jsx31("div", { className: "aviala-cascader-column__surface", "data-animate": animate, children })
3958
4463
  }
3959
4464
  );
3960
4465
  }
@@ -3966,13 +4471,13 @@ function CascaderItemGroup({
3966
4471
  children,
3967
4472
  className
3968
4473
  }) {
3969
- return /* @__PURE__ */ jsxs20("div", { className: cn("aviala-cascader-group", className), children: [
3970
- label ? /* @__PURE__ */ jsx27("div", { className: cn("aviala-cascader-label", typographyVariants({ level: "caption" })), children: label }) : null,
3971
- /* @__PURE__ */ jsx27("div", { className: "aviala-cascader-group__slot", children }),
3972
- showDivider ? /* @__PURE__ */ jsx27("div", { className: "aviala-cascader-separator", role: "separator" }) : null
4474
+ return /* @__PURE__ */ jsxs23("div", { className: cn("aviala-cascader-group", className), children: [
4475
+ label ? /* @__PURE__ */ jsx31("div", { className: cn("aviala-cascader-label", typographyVariants({ level: "caption" })), children: label }) : null,
4476
+ /* @__PURE__ */ jsx31("div", { className: "aviala-cascader-group__slot", children }),
4477
+ showDivider ? /* @__PURE__ */ jsx31("div", { className: "aviala-cascader-separator", role: "separator" }) : null
3973
4478
  ] });
3974
4479
  }
3975
- var CascaderItem = forwardRef21(
4480
+ var CascaderItem = forwardRef25(
3976
4481
  ({
3977
4482
  value,
3978
4483
  pathPrefix = [],
@@ -4030,7 +4535,7 @@ var CascaderItem = forwardRef21(
4030
4535
  expandTo(path);
4031
4536
  }
4032
4537
  };
4033
- return /* @__PURE__ */ jsxs20(
4538
+ return /* @__PURE__ */ jsxs23(
4034
4539
  "button",
4035
4540
  {
4036
4541
  ref,
@@ -4039,7 +4544,7 @@ var CascaderItem = forwardRef21(
4039
4544
  "aria-selected": isSelected,
4040
4545
  "aria-expanded": hasChildren ? isExpanded : void 0,
4041
4546
  disabled: isDisabled,
4042
- className: cn("aviala-cascader-item", className),
4547
+ className: cn("aviala-cascader-item aviala-focus-ring", className),
4043
4548
  "data-layout": layout !== "default" ? layout : void 0,
4044
4549
  "data-function": itemFunction !== "simple" ? itemFunction : void 0,
4045
4550
  "data-selected": isSelected ? "true" : void 0,
@@ -4062,10 +4567,10 @@ var CascaderItem = forwardRef21(
4062
4567
  if (!isTitle) setHighlightedValue(value);
4063
4568
  },
4064
4569
  children: [
4065
- isFormLeading && itemFunction === "form-radio" ? /* @__PURE__ */ jsx27(CascaderItemFormRadio, {}) : null,
4066
- isFormLeading && itemFunction === "form-checkbox" ? /* @__PURE__ */ jsx27(CascaderItemFormCheckbox, {}) : null,
4570
+ isFormLeading && itemFunction === "form-radio" ? /* @__PURE__ */ jsx31(CascaderItemFormRadio, {}) : null,
4571
+ isFormLeading && itemFunction === "form-checkbox" ? /* @__PURE__ */ jsx31(CascaderItemFormCheckbox, {}) : null,
4067
4572
  showLeftIcon && leftIcon ? renderItemIcon2(leftIcon, leftIconLevel, "cascader.content.item.icon-left") : null,
4068
- /* @__PURE__ */ jsx27("span", { className: cn("aviala-cascader-item__text", typographyVariants({ level: isTitle ? "caption" : "text" })), children: children ?? option?.label }),
4573
+ /* @__PURE__ */ jsx31("span", { className: cn("aviala-cascader-item__text", typographyVariants({ level: isTitle ? "caption" : "text" })), children: children ?? option?.label }),
4069
4574
  showBadge ? renderBadgeSlot2(badge ?? "Text") : null,
4070
4575
  showRightIcon && rightIcon ? renderItemIcon2(rightIcon, leftIconLevel) : null,
4071
4576
  renderFunctionSlot2(
@@ -4190,7 +4695,7 @@ function CascaderOptionsMenu({ className }) {
4190
4695
  }, COLUMN_ANIMATION_MS);
4191
4696
  return () => window.clearTimeout(timeout);
4192
4697
  }, [columns, open]);
4193
- return /* @__PURE__ */ jsx27(CascaderMenu, { ref: menuRef, className, children: columns.map(({ pathPrefix, key, animateEnter, animateExit, exitLayout }) => /* @__PURE__ */ jsx27(
4698
+ return /* @__PURE__ */ jsx31(CascaderMenu, { ref: menuRef, className, children: columns.map(({ pathPrefix, key, animateEnter, animateExit, exitLayout }) => /* @__PURE__ */ jsx31(
4194
4699
  CascaderColumn,
4195
4700
  {
4196
4701
  ref: (element) => {
@@ -4203,7 +4708,7 @@ function CascaderOptionsMenu({ className }) {
4203
4708
  animateEnter,
4204
4709
  animateExit,
4205
4710
  exitLayout,
4206
- children: /* @__PURE__ */ jsx27(CascaderItemGroup, { label: "Title", showDivider: true, children: getOptionsAtPath2(pathPrefix).map((option) => /* @__PURE__ */ jsx27(
4711
+ children: /* @__PURE__ */ jsx31(CascaderItemGroup, { label: "Title", showDivider: true, children: getOptionsAtPath2(pathPrefix).map((option) => /* @__PURE__ */ jsx31(
4207
4712
  CascaderItem,
4208
4713
  {
4209
4714
  value: option.value,
@@ -4241,7 +4746,7 @@ function CascaderField({
4241
4746
  separator,
4242
4747
  ...triggerProps
4243
4748
  }) {
4244
- return /* @__PURE__ */ jsxs20(
4749
+ return /* @__PURE__ */ jsxs23(
4245
4750
  Cascader,
4246
4751
  {
4247
4752
  options,
@@ -4256,7 +4761,7 @@ function CascaderField({
4256
4761
  changeOnSelect,
4257
4762
  className,
4258
4763
  children: [
4259
- /* @__PURE__ */ jsx27(
4764
+ /* @__PURE__ */ jsx31(
4260
4765
  CascaderTrigger,
4261
4766
  {
4262
4767
  size,
@@ -4270,7 +4775,7 @@ function CascaderField({
4270
4775
  ...triggerProps
4271
4776
  }
4272
4777
  ),
4273
- /* @__PURE__ */ jsx27(CascaderContent, { className: contentClassName, children: /* @__PURE__ */ jsx27(CascaderOptionsMenu, { className: menuClassName }) })
4778
+ /* @__PURE__ */ jsx31(CascaderContent, { className: contentClassName, children: /* @__PURE__ */ jsx31(CascaderOptionsMenu, { className: menuClassName }) })
4274
4779
  ]
4275
4780
  }
4276
4781
  );
@@ -4285,7 +4790,7 @@ import {
4285
4790
  TimeAndDateDate
4286
4791
  } from "@aviala-design/icons";
4287
4792
  import {
4288
- forwardRef as forwardRef22,
4793
+ forwardRef as forwardRef26,
4289
4794
  useCallback as useCallback11,
4290
4795
  useEffect as useEffect6,
4291
4796
  useId as useId2,
@@ -4296,13 +4801,13 @@ import {
4296
4801
 
4297
4802
  // src/components/date-picker/date-picker-context.tsx
4298
4803
  import { createContext as createContext6, useContext as useContext6 } from "react";
4299
- import { jsx as jsx28 } from "react/jsx-runtime";
4804
+ import { jsx as jsx32 } from "react/jsx-runtime";
4300
4805
  var DatePickerContext = createContext6(null);
4301
4806
  function DatePickerProvider({
4302
4807
  value,
4303
4808
  children
4304
4809
  }) {
4305
- return /* @__PURE__ */ jsx28(DatePickerContext.Provider, { value, children });
4810
+ return /* @__PURE__ */ jsx32(DatePickerContext.Provider, { value, children });
4306
4811
  }
4307
4812
  function useDatePickerContext() {
4308
4813
  const context = useContext6(DatePickerContext);
@@ -4319,6 +4824,11 @@ function startOfDay(date) {
4319
4824
  copy.setHours(0, 0, 0, 0);
4320
4825
  return copy;
4321
4826
  }
4827
+ function applyTimeToDate(date, hours, minutes) {
4828
+ const next = startOfDay(date);
4829
+ next.setHours(hours, minutes, 0, 0);
4830
+ return next;
4831
+ }
4322
4832
  function isSameDay(a, b) {
4323
4833
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
4324
4834
  }
@@ -4432,7 +4942,7 @@ import {
4432
4942
  useMemo as useMemo5,
4433
4943
  useRef as useRef6
4434
4944
  } from "react";
4435
- import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
4945
+ import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
4436
4946
  var LOOP_SECTIONS = 3;
4437
4947
  var MIDDLE_SECTION = 1;
4438
4948
  var SCROLL_END_DEBOUNCE_MS = 80;
@@ -4594,44 +5104,44 @@ function DatePickerTimeWheelColumn({
4594
5104
  }
4595
5105
  };
4596
5106
  const selectedOptionId = loop ? `${ariaLabel}-${value}-${values.length * MIDDLE_SECTION + getValueIndex(values, value)}` : `${ariaLabel}-${value}`;
4597
- return /* @__PURE__ */ jsxs21("div", { className: cn("aviala-datepicker-time__wheel", className), children: [
4598
- /* @__PURE__ */ jsx29("div", { className: "aviala-datepicker-time__wheel-highlight", "aria-hidden": true }),
4599
- /* @__PURE__ */ jsx29(
5107
+ return /* @__PURE__ */ jsxs24("div", { className: cn("aviala-datepicker-time__wheel", className), children: [
5108
+ /* @__PURE__ */ jsx33("div", { className: "aviala-datepicker-time__wheel-highlight", "aria-hidden": true }),
5109
+ /* @__PURE__ */ jsx33(
4600
5110
  "div",
4601
5111
  {
4602
5112
  className: "aviala-datepicker-time__wheel-fade aviala-datepicker-time__wheel-fade--top",
4603
5113
  "aria-hidden": true
4604
5114
  }
4605
5115
  ),
4606
- /* @__PURE__ */ jsx29(
5116
+ /* @__PURE__ */ jsx33(
4607
5117
  "div",
4608
5118
  {
4609
5119
  className: "aviala-datepicker-time__wheel-fade aviala-datepicker-time__wheel-fade--bottom",
4610
5120
  "aria-hidden": true
4611
5121
  }
4612
5122
  ),
4613
- /* @__PURE__ */ jsx29(
5123
+ /* @__PURE__ */ jsx33(
4614
5124
  "div",
4615
5125
  {
4616
5126
  ref: scrollRef,
4617
- className: "aviala-datepicker-time__wheel-scroll",
5127
+ className: "aviala-datepicker-time__wheel-scroll aviala-focus-ring",
4618
5128
  onScroll: handleScroll,
4619
5129
  role: "listbox",
4620
5130
  "aria-label": ariaLabel,
4621
5131
  "aria-activedescendant": selectedOptionId,
4622
5132
  tabIndex: 0,
4623
5133
  onKeyDown: handleKeyDown,
4624
- children: /* @__PURE__ */ jsx29("ul", { className: "aviala-datepicker-time__wheel-list", children: repeatedValues.map((itemValue, index) => {
5134
+ children: /* @__PURE__ */ jsx33("ul", { className: "aviala-datepicker-time__wheel-list", children: repeatedValues.map((itemValue, index) => {
4625
5135
  const isSelected = itemValue === value;
4626
5136
  const optionId = loop ? `${ariaLabel}-${itemValue}-${index}` : `${ariaLabel}-${itemValue}`;
4627
- return /* @__PURE__ */ jsx29(
5137
+ return /* @__PURE__ */ jsx33(
4628
5138
  "li",
4629
5139
  {
4630
5140
  id: optionId,
4631
5141
  className: "aviala-datepicker-time__wheel-item",
4632
5142
  role: "option",
4633
5143
  "aria-selected": isSelected,
4634
- children: /* @__PURE__ */ jsx29(
5144
+ children: /* @__PURE__ */ jsx33(
4635
5145
  "button",
4636
5146
  {
4637
5147
  type: "button",
@@ -4660,12 +5170,12 @@ function DatePickerTimeWheelColumn({
4660
5170
  }
4661
5171
 
4662
5172
  // src/components/time-picker/time-picker-wheels.tsx
4663
- import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
5173
+ import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
4664
5174
  var TIME_PICKER_HOUR_VALUES = Array.from({ length: 24 }, (_, index) => index);
4665
5175
  var TIME_PICKER_MINUTE_VALUES = Array.from({ length: 12 }, (_, index) => index * 5);
4666
5176
  function TimePickerWheels({ value, onChange, className }) {
4667
- return /* @__PURE__ */ jsx30("div", { className: cn("aviala-datepicker-time", className), role: "group", "aria-label": "\u9009\u62E9\u65F6\u95F4", children: /* @__PURE__ */ jsxs22("div", { className: "aviala-datepicker-time__columns", children: [
4668
- /* @__PURE__ */ jsx30(
5177
+ return /* @__PURE__ */ jsx34("div", { className: cn("aviala-datepicker-time", className), role: "group", "aria-label": "\u9009\u62E9\u65F6\u95F4", children: /* @__PURE__ */ jsxs25("div", { className: "aviala-datepicker-time__columns", children: [
5178
+ /* @__PURE__ */ jsx34(
4669
5179
  DatePickerTimeWheelColumn,
4670
5180
  {
4671
5181
  "aria-label": "\u5C0F\u65F6",
@@ -4674,7 +5184,7 @@ function TimePickerWheels({ value, onChange, className }) {
4674
5184
  onChange: (hours) => onChange({ ...value, hours })
4675
5185
  }
4676
5186
  ),
4677
- /* @__PURE__ */ jsx30(
5187
+ /* @__PURE__ */ jsx34(
4678
5188
  DatePickerTimeWheelColumn,
4679
5189
  {
4680
5190
  "aria-label": "\u5206\u949F",
@@ -4687,14 +5197,14 @@ function TimePickerWheels({ value, onChange, className }) {
4687
5197
  }
4688
5198
 
4689
5199
  // src/components/date-picker/date-picker.tsx
4690
- import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
5200
+ import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
4691
5201
  function renderSlotIcon5(node) {
4692
5202
  if (!node) return null;
4693
5203
  const content = cloneAvialaIconElement(node, {
4694
5204
  level: "text",
4695
5205
  biggerSize: true
4696
5206
  });
4697
- return /* @__PURE__ */ jsx31(
5207
+ return /* @__PURE__ */ jsx35(
4698
5208
  "span",
4699
5209
  {
4700
5210
  className: "aviala-datepicker-trigger__slot",
@@ -4747,8 +5257,39 @@ function DatePicker(props) {
4747
5257
  setInternalTime(next);
4748
5258
  }
4749
5259
  onTimeChange?.(next);
5260
+ if (!enableTime) return;
5261
+ if (mode === "single") {
5262
+ const current = props.value !== void 0 ? props.value : internalSingle;
5263
+ if (!current) return;
5264
+ const controlled2 = props.value !== void 0;
5265
+ const merged2 = applyTimeToDate(current, next.hours, next.minutes);
5266
+ if (!controlled2) {
5267
+ setInternalSingle(merged2);
5268
+ }
5269
+ props.onValueChange?.(merged2);
5270
+ return;
5271
+ }
5272
+ const currentRange = props.value !== void 0 ? props.value ?? {} : internalRange;
5273
+ if (!currentRange.from && !currentRange.to) return;
5274
+ const controlled = props.value !== void 0;
5275
+ const merged = {
5276
+ from: currentRange.from ? applyTimeToDate(currentRange.from, next.hours, next.minutes) : void 0,
5277
+ to: currentRange.to ? applyTimeToDate(currentRange.to, next.hours, next.minutes) : void 0
5278
+ };
5279
+ if (!controlled) {
5280
+ setInternalRange(merged);
5281
+ }
5282
+ props.onValueChange?.(merged);
4750
5283
  },
4751
- [onTimeChange, timeValueProp]
5284
+ [
5285
+ enableTime,
5286
+ internalRange,
5287
+ internalSingle,
5288
+ mode,
5289
+ onTimeChange,
5290
+ props,
5291
+ timeValueProp
5292
+ ]
4752
5293
  );
4753
5294
  const singleValue = mode === "single" ? props.value !== void 0 ? props.value : internalSingle : void 0;
4754
5295
  const rangeValue = mode === "range" ? props.value !== void 0 ? props.value ?? {} : internalRange : { from: rangeDraftFrom };
@@ -4825,32 +5366,50 @@ function DatePicker(props) {
4825
5366
  setViewMonth(new Date(day.getFullYear(), day.getMonth(), 1));
4826
5367
  }
4827
5368
  if (mode === "single") {
4828
- commitSingle(day);
4829
- handleOpenChange(false);
5369
+ const next = enableTime ? applyTimeToDate(day, timeValue.hours, timeValue.minutes) : day;
5370
+ commitSingle(next);
5371
+ if (enableTime) {
5372
+ setActivePanel("time");
5373
+ } else {
5374
+ handleOpenChange(false);
5375
+ }
4830
5376
  return;
4831
5377
  }
4832
5378
  const currentFrom = rangeDraftFrom ?? rangeValue.from;
4833
5379
  const currentTo = rangeValue.to;
5380
+ const withTime = (d) => enableTime ? applyTimeToDate(d, timeValue.hours, timeValue.minutes) : d;
4834
5381
  if (!currentFrom || currentFrom && currentTo) {
4835
5382
  setRangeDraftFrom(day);
4836
- commitRange({ from: day, to: void 0 });
5383
+ commitRange({ from: withTime(day), to: void 0 });
4837
5384
  return;
4838
5385
  }
4839
5386
  if (isSameDay(day, currentFrom)) {
4840
- commitRange({ from: day, to: day });
5387
+ commitRange({ from: withTime(day), to: withTime(day) });
4841
5388
  setRangeDraftFrom(void 0);
4842
- handleOpenChange(false);
5389
+ if (enableTime) {
5390
+ setActivePanel("time");
5391
+ } else {
5392
+ handleOpenChange(false);
5393
+ }
4843
5394
  return;
4844
5395
  }
4845
5396
  const normalized = normalizeRange(currentFrom, day);
4846
- commitRange(normalized);
5397
+ commitRange({
5398
+ from: normalized.from ? withTime(normalized.from) : void 0,
5399
+ to: normalized.to ? withTime(normalized.to) : void 0
5400
+ });
4847
5401
  setRangeDraftFrom(void 0);
4848
- handleOpenChange(false);
5402
+ if (enableTime) {
5403
+ setActivePanel("time");
5404
+ } else {
5405
+ handleOpenChange(false);
5406
+ }
4849
5407
  },
4850
5408
  [
4851
5409
  commitRange,
4852
5410
  commitSingle,
4853
5411
  disabled,
5412
+ enableTime,
4854
5413
  handleOpenChange,
4855
5414
  maxDate,
4856
5415
  minDate,
@@ -4858,6 +5417,8 @@ function DatePicker(props) {
4858
5417
  rangeDraftFrom,
4859
5418
  rangeValue.from,
4860
5419
  rangeValue.to,
5420
+ timeValue.hours,
5421
+ timeValue.minutes,
4861
5422
  viewMonth
4862
5423
  ]
4863
5424
  );
@@ -4901,9 +5462,9 @@ function DatePicker(props) {
4901
5462
  viewMonth
4902
5463
  ]
4903
5464
  );
4904
- return /* @__PURE__ */ jsx31(DatePickerProvider, { value: contextValue, children: /* @__PURE__ */ jsx31(PopoverPrimitive4.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx31("div", { className: cn("inline-flex", className), children }) }) });
5465
+ return /* @__PURE__ */ jsx35(DatePickerProvider, { value: contextValue, children: /* @__PURE__ */ jsx35(PopoverPrimitive4.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx35("div", { className: cn("inline-flex", className), children }) }) });
4905
5466
  }
4906
- var DatePickerTrigger = forwardRef22(
5467
+ var DatePickerTrigger = forwardRef26(
4907
5468
  ({
4908
5469
  className,
4909
5470
  size: sizeProp,
@@ -4933,12 +5494,12 @@ var DatePickerTrigger = forwardRef22(
4933
5494
  const formatted = displayValue ?? (mode === "single" ? singleValue ? enableTime ? formatDisplayDateTime(singleValue, timeValue.hours, timeValue.minutes) : formatDisplayDate(singleValue) : null : rangeValue.from && rangeValue.to ? enableTime ? `${formatDisplayDateTime(rangeValue.from, timeValue.hours, timeValue.minutes)}${rangeSeparator}${formatDisplayDateTime(rangeValue.to, timeValue.hours, timeValue.minutes)}` : `${formatDisplayDate(rangeValue.from)}${rangeSeparator}${formatDisplayDate(rangeValue.to)}` : rangeValue.from ? enableTime ? `${formatDisplayDateTime(rangeValue.from, timeValue.hours, timeValue.minutes)}${rangeSeparator}\u2026` : `${formatDisplayDate(rangeValue.from)}${rangeSeparator}\u2026` : null);
4934
5495
  const defaultPlaceholder = enableTime ? "YYYY-MM-DD HH:mm" : placeholder;
4935
5496
  const hasValue = formatted != null && formatted !== false;
4936
- return /* @__PURE__ */ jsx31(PopoverPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs23(
5497
+ return /* @__PURE__ */ jsx35(PopoverPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs26(
4937
5498
  "button",
4938
5499
  {
4939
5500
  ref,
4940
5501
  type: "button",
4941
- className: cn("aviala-datepicker-trigger", className),
5502
+ className: cn("aviala-datepicker-trigger aviala-focus-ring", className),
4942
5503
  "data-size": size,
4943
5504
  "data-all-round": allRound ? "true" : "false",
4944
5505
  "data-state": open ? "open" : "closed",
@@ -4949,9 +5510,9 @@ var DatePickerTrigger = forwardRef22(
4949
5510
  ...props,
4950
5511
  children: [
4951
5512
  renderSlotIcon5(
4952
- leftIcon ?? /* @__PURE__ */ jsx31(TimeAndDateDate, { level: "text", biggerSize: true, "aria-hidden": true })
5513
+ leftIcon ?? /* @__PURE__ */ jsx35(TimeAndDateDate, { level: "text", biggerSize: true, "aria-hidden": true })
4953
5514
  ),
4954
- /* @__PURE__ */ jsx31("span", { className: "aviala-datepicker-trigger__field", children: /* @__PURE__ */ jsx31(
5515
+ /* @__PURE__ */ jsx35("span", { className: "aviala-datepicker-trigger__field", children: /* @__PURE__ */ jsx35(
4955
5516
  "span",
4956
5517
  {
4957
5518
  className: cn(
@@ -4969,7 +5530,7 @@ var DatePickerTrigger = forwardRef22(
4969
5530
  }
4970
5531
  );
4971
5532
  DatePickerTrigger.displayName = "DatePickerTrigger";
4972
- var DatePickerContent = forwardRef22(
5533
+ var DatePickerContent = forwardRef26(
4973
5534
  ({
4974
5535
  className,
4975
5536
  children,
@@ -4978,7 +5539,7 @@ var DatePickerContent = forwardRef22(
4978
5539
  align = "start",
4979
5540
  ...props
4980
5541
  }, ref) => {
4981
- const content = /* @__PURE__ */ jsx31(
5542
+ const content = /* @__PURE__ */ jsx35(
4982
5543
  PopoverPrimitive4.Content,
4983
5544
  {
4984
5545
  ref,
@@ -4986,11 +5547,11 @@ var DatePickerContent = forwardRef22(
4986
5547
  sideOffset,
4987
5548
  align,
4988
5549
  ...props,
4989
- children: children ?? /* @__PURE__ */ jsx31(DatePickerCalendar, {})
5550
+ children: children ?? /* @__PURE__ */ jsx35(DatePickerCalendar, {})
4990
5551
  }
4991
5552
  );
4992
5553
  if (!portalled) return content;
4993
- return /* @__PURE__ */ jsx31(PopoverPrimitive4.Portal, { children: content });
5554
+ return /* @__PURE__ */ jsx35(PopoverPrimitive4.Portal, { children: content });
4994
5555
  }
4995
5556
  );
4996
5557
  DatePickerContent.displayName = "DatePickerContent";
@@ -5008,7 +5569,7 @@ function getFooterDateLabel(mode, singleValue, rangeValue) {
5008
5569
  }
5009
5570
  function DatePickerTimePanel() {
5010
5571
  const { timeValue, setTimeValue } = useDatePickerContext();
5011
- return /* @__PURE__ */ jsx31(TimePickerWheels, { value: timeValue, onChange: setTimeValue });
5572
+ return /* @__PURE__ */ jsx35(TimePickerWheels, { value: timeValue, onChange: setTimeValue });
5012
5573
  }
5013
5574
  function DatePickerPanelFooter() {
5014
5575
  const {
@@ -5023,7 +5584,7 @@ function DatePickerPanelFooter() {
5023
5584
  if (!enableTime) return null;
5024
5585
  const panelValue = activePanel === "date" ? "date" : "time";
5025
5586
  const isRangeMode = mode === "range";
5026
- return /* @__PURE__ */ jsxs23(
5587
+ return /* @__PURE__ */ jsxs26(
5027
5588
  SegmentatorGroup,
5028
5589
  {
5029
5590
  value: panelValue,
@@ -5034,20 +5595,20 @@ function DatePickerPanelFooter() {
5034
5595
  "data-active-panel": activePanel,
5035
5596
  "aria-label": "\u65E5\u671F\u4E0E\u65F6\u95F4\u5207\u6362",
5036
5597
  children: [
5037
- /* @__PURE__ */ jsx31(
5598
+ /* @__PURE__ */ jsx35(
5038
5599
  SegmentatorItem,
5039
5600
  {
5040
5601
  value: "date",
5041
- leftIcon: /* @__PURE__ */ jsx31(TimeAndDateDate, { level: "text", biggerSize: true, "aria-hidden": true }),
5602
+ leftIcon: /* @__PURE__ */ jsx35(TimeAndDateDate, { level: "text", biggerSize: true, "aria-hidden": true }),
5042
5603
  iconOnly: isRangeMode && activePanel === "time",
5043
5604
  children: getFooterDateLabel(mode, singleValue, rangeValue)
5044
5605
  }
5045
5606
  ),
5046
- /* @__PURE__ */ jsx31(
5607
+ /* @__PURE__ */ jsx35(
5047
5608
  SegmentatorItem,
5048
5609
  {
5049
5610
  value: "time",
5050
- leftIcon: /* @__PURE__ */ jsx31(TimeAndDateClock, { level: "text", biggerSize: true, "aria-hidden": true }),
5611
+ leftIcon: /* @__PURE__ */ jsx35(TimeAndDateClock, { level: "text", biggerSize: true, "aria-hidden": true }),
5051
5612
  iconOnly: isRangeMode && activePanel === "date",
5052
5613
  children: formatTimeValue(timeValue.hours, timeValue.minutes)
5053
5614
  }
@@ -5121,26 +5682,26 @@ function DatePickerCalendar({ className }) {
5121
5682
  setViewMonth(new Date(normalized.getFullYear(), normalized.getMonth(), 1));
5122
5683
  }
5123
5684
  };
5124
- return /* @__PURE__ */ jsxs23(
5685
+ return /* @__PURE__ */ jsxs26(
5125
5686
  "div",
5126
5687
  {
5127
5688
  className: cn("aviala-datepicker-calendar", className),
5128
5689
  role: "application",
5129
5690
  "aria-label": "Calendar",
5130
5691
  children: [
5131
- activePanel === "time" && enableTime ? /* @__PURE__ */ jsx31("div", { className: "aviala-datepicker-calendar__body", children: /* @__PURE__ */ jsx31(DatePickerTimePanel, {}) }) : /* @__PURE__ */ jsxs23("div", { className: "aviala-datepicker-calendar__body", children: [
5132
- /* @__PURE__ */ jsxs23("div", { className: "aviala-datepicker-calendar__header", children: [
5133
- /* @__PURE__ */ jsx31(
5692
+ activePanel === "time" && enableTime ? /* @__PURE__ */ jsx35("div", { className: "aviala-datepicker-calendar__body", children: /* @__PURE__ */ jsx35(DatePickerTimePanel, {}) }) : /* @__PURE__ */ jsxs26("div", { className: "aviala-datepicker-calendar__body", children: [
5693
+ /* @__PURE__ */ jsxs26("div", { className: "aviala-datepicker-calendar__header", children: [
5694
+ /* @__PURE__ */ jsx35(
5134
5695
  "button",
5135
5696
  {
5136
5697
  type: "button",
5137
- className: "aviala-datepicker-calendar__nav",
5698
+ className: "aviala-datepicker-calendar__nav aviala-focus-ring",
5138
5699
  "aria-label": "Previous month",
5139
5700
  onClick: () => setViewMonth(addMonths(viewMonth, -1)),
5140
- children: /* @__PURE__ */ jsx31(DirectionArrowLeft, { level: "text", biggerSize: true, "aria-hidden": true })
5701
+ children: /* @__PURE__ */ jsx35(DirectionArrowLeft, { level: "text", biggerSize: true, "aria-hidden": true })
5141
5702
  }
5142
5703
  ),
5143
- /* @__PURE__ */ jsx31(
5704
+ /* @__PURE__ */ jsx35(
5144
5705
  "div",
5145
5706
  {
5146
5707
  id: `${calendarId}-label`,
@@ -5151,18 +5712,18 @@ function DatePickerCalendar({ className }) {
5151
5712
  children: formatMonthYear(viewMonth)
5152
5713
  }
5153
5714
  ),
5154
- /* @__PURE__ */ jsx31(
5715
+ /* @__PURE__ */ jsx35(
5155
5716
  "button",
5156
5717
  {
5157
5718
  type: "button",
5158
- className: "aviala-datepicker-calendar__nav",
5719
+ className: "aviala-datepicker-calendar__nav aviala-focus-ring",
5159
5720
  "aria-label": "Next month",
5160
5721
  onClick: () => setViewMonth(addMonths(viewMonth, 1)),
5161
- children: /* @__PURE__ */ jsx31(DirectionArrowRight2, { level: "text", biggerSize: true, "aria-hidden": true })
5722
+ children: /* @__PURE__ */ jsx35(DirectionArrowRight2, { level: "text", biggerSize: true, "aria-hidden": true })
5162
5723
  }
5163
5724
  )
5164
5725
  ] }),
5165
- /* @__PURE__ */ jsx31("div", { className: "aviala-datepicker-calendar__weekdays", "aria-hidden": true, children: WEEKDAY_LABELS.map((label) => /* @__PURE__ */ jsx31(
5726
+ /* @__PURE__ */ jsx35("div", { className: "aviala-datepicker-calendar__weekdays", "aria-hidden": true, children: WEEKDAY_LABELS.map((label) => /* @__PURE__ */ jsx35(
5166
5727
  "span",
5167
5728
  {
5168
5729
  className: cn(
@@ -5173,7 +5734,7 @@ function DatePickerCalendar({ className }) {
5173
5734
  },
5174
5735
  label
5175
5736
  )) }),
5176
- /* @__PURE__ */ jsx31(
5737
+ /* @__PURE__ */ jsx35(
5177
5738
  "div",
5178
5739
  {
5179
5740
  className: "aviala-datepicker-calendar__grid",
@@ -5187,13 +5748,13 @@ function DatePickerCalendar({ className }) {
5187
5748
  const isToday = isSameDay(day, today);
5188
5749
  const disabled = isDateDisabled(day, minDate, maxDate);
5189
5750
  const focused = focusedDay ? isSameDay(day, focusedDay) : false;
5190
- return /* @__PURE__ */ jsxs23(
5751
+ return /* @__PURE__ */ jsxs26(
5191
5752
  "button",
5192
5753
  {
5193
5754
  type: "button",
5194
5755
  role: "gridcell",
5195
5756
  tabIndex: focused || !focusedDay && isToday ? 0 : -1,
5196
- className: "aviala-datepicker-day",
5757
+ className: "aviala-datepicker-day aviala-focus-ring",
5197
5758
  "data-outside": outside ? "true" : void 0,
5198
5759
  "data-selected": selected ? "true" : void 0,
5199
5760
  "data-in-range": inRange && !selected ? "true" : void 0,
@@ -5208,7 +5769,7 @@ function DatePickerCalendar({ className }) {
5208
5769
  onFocus: () => setFocusedDay(day),
5209
5770
  onKeyDown: (event) => handleDayKeyDown(event, day),
5210
5771
  children: [
5211
- /* @__PURE__ */ jsx31(
5772
+ /* @__PURE__ */ jsx35(
5212
5773
  "span",
5213
5774
  {
5214
5775
  className: cn(
@@ -5218,7 +5779,7 @@ function DatePickerCalendar({ className }) {
5218
5779
  children: day.getDate()
5219
5780
  }
5220
5781
  ),
5221
- isToday ? /* @__PURE__ */ jsx31("span", { className: "aviala-datepicker-day__today-dot", "aria-hidden": true }) : null
5782
+ isToday ? /* @__PURE__ */ jsx35("span", { className: "aviala-datepicker-day__today-dot", "aria-hidden": true }) : null
5222
5783
  ]
5223
5784
  },
5224
5785
  day.toISOString()
@@ -5227,7 +5788,7 @@ function DatePickerCalendar({ className }) {
5227
5788
  }
5228
5789
  )
5229
5790
  ] }),
5230
- /* @__PURE__ */ jsx31(DatePickerPanelFooter, {})
5791
+ /* @__PURE__ */ jsx35(DatePickerPanelFooter, {})
5231
5792
  ]
5232
5793
  }
5233
5794
  );
@@ -5290,8 +5851,8 @@ function DatePickerField({
5290
5851
  defaultTimeValue,
5291
5852
  onTimeChange
5292
5853
  };
5293
- return /* @__PURE__ */ jsxs23(DatePicker, { ...pickerProps, size, className, children: [
5294
- /* @__PURE__ */ jsx31(
5854
+ return /* @__PURE__ */ jsxs26(DatePicker, { ...pickerProps, size, className, children: [
5855
+ /* @__PURE__ */ jsx35(
5295
5856
  DatePickerTrigger,
5296
5857
  {
5297
5858
  size,
@@ -5304,7 +5865,7 @@ function DatePickerField({
5304
5865
  rangeSeparator
5305
5866
  }
5306
5867
  ),
5307
- /* @__PURE__ */ jsx31(DatePickerContent, { className: contentClassName, children: /* @__PURE__ */ jsx31(DatePickerCalendar, { className: calendarClassName }) })
5868
+ /* @__PURE__ */ jsx35(DatePickerContent, { className: contentClassName, children: /* @__PURE__ */ jsx35(DatePickerCalendar, { className: calendarClassName }) })
5308
5869
  ] });
5309
5870
  }
5310
5871
 
@@ -5312,7 +5873,7 @@ function DatePickerField({
5312
5873
  import * as PopoverPrimitive5 from "@radix-ui/react-popover";
5313
5874
  import { TimeAndDateClock as TimeAndDateClock2 } from "@aviala-design/icons";
5314
5875
  import {
5315
- forwardRef as forwardRef23,
5876
+ forwardRef as forwardRef27,
5316
5877
  useCallback as useCallback12,
5317
5878
  useEffect as useEffect7,
5318
5879
  useMemo as useMemo7,
@@ -5322,13 +5883,13 @@ import {
5322
5883
 
5323
5884
  // src/components/time-picker/time-picker-context.tsx
5324
5885
  import { createContext as createContext7, useContext as useContext7 } from "react";
5325
- import { jsx as jsx32 } from "react/jsx-runtime";
5886
+ import { jsx as jsx36 } from "react/jsx-runtime";
5326
5887
  var TimePickerContext = createContext7(null);
5327
5888
  function TimePickerProvider({
5328
5889
  value,
5329
5890
  children
5330
5891
  }) {
5331
- return /* @__PURE__ */ jsx32(TimePickerContext.Provider, { value, children });
5892
+ return /* @__PURE__ */ jsx36(TimePickerContext.Provider, { value, children });
5332
5893
  }
5333
5894
  function useTimePickerContext() {
5334
5895
  const context = useContext7(TimePickerContext);
@@ -5339,14 +5900,14 @@ function useTimePickerContext() {
5339
5900
  }
5340
5901
 
5341
5902
  // src/components/time-picker/time-picker.tsx
5342
- import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
5903
+ import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
5343
5904
  function renderSlotIcon6(node) {
5344
5905
  if (!node) return null;
5345
5906
  const content = cloneAvialaIconElement(node, {
5346
5907
  level: "text",
5347
5908
  biggerSize: true
5348
5909
  });
5349
- return /* @__PURE__ */ jsx33(
5910
+ return /* @__PURE__ */ jsx37(
5350
5911
  "span",
5351
5912
  {
5352
5913
  className: "aviala-timepicker-trigger__slot",
@@ -5427,9 +5988,9 @@ function TimePicker({
5427
5988
  }),
5428
5989
  [disabled, open, size, value, setValue]
5429
5990
  );
5430
- return /* @__PURE__ */ jsx33(TimePickerProvider, { value: contextValue, children: /* @__PURE__ */ jsx33(PopoverPrimitive5.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx33("div", { className: cn("inline-flex", className), children }) }) });
5991
+ return /* @__PURE__ */ jsx37(TimePickerProvider, { value: contextValue, children: /* @__PURE__ */ jsx37(PopoverPrimitive5.Root, { open, onOpenChange: handleOpenChange, modal: false, children: /* @__PURE__ */ jsx37("div", { className: cn("inline-flex", className), children }) }) });
5431
5992
  }
5432
- var TimePickerTrigger = forwardRef23(
5993
+ var TimePickerTrigger = forwardRef27(
5433
5994
  ({
5434
5995
  className,
5435
5996
  size: sizeProp,
@@ -5447,12 +6008,12 @@ var TimePickerTrigger = forwardRef23(
5447
6008
  const disabled = disabledProp ?? disabledContext;
5448
6009
  const formatted = displayValue !== void 0 ? displayValue : formatTimeValue(value.hours, value.minutes);
5449
6010
  const hasValue = formatted != null && formatted !== "";
5450
- return /* @__PURE__ */ jsx33(PopoverPrimitive5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs24(
6011
+ return /* @__PURE__ */ jsx37(PopoverPrimitive5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
5451
6012
  "button",
5452
6013
  {
5453
6014
  ref,
5454
6015
  type: "button",
5455
- className: cn("aviala-timepicker-trigger", className),
6016
+ className: cn("aviala-timepicker-trigger aviala-focus-ring", className),
5456
6017
  "data-size": size,
5457
6018
  "data-all-round": allRound ? "true" : "false",
5458
6019
  "data-state": open ? "open" : "closed",
@@ -5463,9 +6024,9 @@ var TimePickerTrigger = forwardRef23(
5463
6024
  ...props,
5464
6025
  children: [
5465
6026
  renderSlotIcon6(
5466
- leftIcon ?? /* @__PURE__ */ jsx33(TimeAndDateClock2, { level: "text", biggerSize: true, "aria-hidden": true })
6027
+ leftIcon ?? /* @__PURE__ */ jsx37(TimeAndDateClock2, { level: "text", biggerSize: true, "aria-hidden": true })
5467
6028
  ),
5468
- /* @__PURE__ */ jsx33("span", { className: "aviala-timepicker-trigger__field", children: /* @__PURE__ */ jsx33(
6029
+ /* @__PURE__ */ jsx37("span", { className: "aviala-timepicker-trigger__field", children: /* @__PURE__ */ jsx37(
5469
6030
  "span",
5470
6031
  {
5471
6032
  className: cn(
@@ -5483,7 +6044,7 @@ var TimePickerTrigger = forwardRef23(
5483
6044
  }
5484
6045
  );
5485
6046
  TimePickerTrigger.displayName = "TimePickerTrigger";
5486
- var TimePickerContent = forwardRef23(
6047
+ var TimePickerContent = forwardRef27(
5487
6048
  ({
5488
6049
  className,
5489
6050
  children,
@@ -5492,7 +6053,7 @@ var TimePickerContent = forwardRef23(
5492
6053
  align = "start",
5493
6054
  ...props
5494
6055
  }, ref) => {
5495
- const content = /* @__PURE__ */ jsx33(
6056
+ const content = /* @__PURE__ */ jsx37(
5496
6057
  PopoverPrimitive5.Content,
5497
6058
  {
5498
6059
  ref,
@@ -5500,17 +6061,17 @@ var TimePickerContent = forwardRef23(
5500
6061
  sideOffset,
5501
6062
  align,
5502
6063
  ...props,
5503
- children: children ?? /* @__PURE__ */ jsx33(TimePickerPanel, {})
6064
+ children: children ?? /* @__PURE__ */ jsx37(TimePickerPanel, {})
5504
6065
  }
5505
6066
  );
5506
6067
  if (!portalled) return content;
5507
- return /* @__PURE__ */ jsx33(PopoverPrimitive5.Portal, { children: content });
6068
+ return /* @__PURE__ */ jsx37(PopoverPrimitive5.Portal, { children: content });
5508
6069
  }
5509
6070
  );
5510
6071
  TimePickerContent.displayName = "TimePickerContent";
5511
6072
  function TimePickerPanel({ className }) {
5512
6073
  const { value, setValue } = useTimePickerContext();
5513
- return /* @__PURE__ */ jsx33("div", { className: cn("aviala-timepicker-panel", className), role: "application", "aria-label": "Time picker", children: /* @__PURE__ */ jsx33(TimePickerWheels, { value, onChange: setValue }) });
6074
+ return /* @__PURE__ */ jsx37("div", { className: cn("aviala-timepicker-panel", className), role: "application", "aria-label": "Time picker", children: /* @__PURE__ */ jsx37(TimePickerWheels, { value, onChange: setValue }) });
5514
6075
  }
5515
6076
  function TimePickerField({
5516
6077
  contentClassName,
@@ -5530,7 +6091,7 @@ function TimePickerField({
5530
6091
  onOpenChange,
5531
6092
  disabled
5532
6093
  }) {
5533
- return /* @__PURE__ */ jsxs24(
6094
+ return /* @__PURE__ */ jsxs27(
5534
6095
  TimePicker,
5535
6096
  {
5536
6097
  value,
@@ -5543,7 +6104,7 @@ function TimePickerField({
5543
6104
  size,
5544
6105
  className,
5545
6106
  children: [
5546
- /* @__PURE__ */ jsx33(
6107
+ /* @__PURE__ */ jsx37(
5547
6108
  TimePickerTrigger,
5548
6109
  {
5549
6110
  size,
@@ -5554,7 +6115,7 @@ function TimePickerField({
5554
6115
  error
5555
6116
  }
5556
6117
  ),
5557
- /* @__PURE__ */ jsx33(TimePickerContent, { className: contentClassName, children: /* @__PURE__ */ jsx33(TimePickerPanel, { className: panelClassName }) })
6118
+ /* @__PURE__ */ jsx37(TimePickerContent, { className: contentClassName, children: /* @__PURE__ */ jsx37(TimePickerPanel, { className: panelClassName }) })
5558
6119
  ]
5559
6120
  }
5560
6121
  );
@@ -5563,7 +6124,7 @@ function TimePickerField({
5563
6124
  // src/components/popover.tsx
5564
6125
  import * as PopoverPrimitive6 from "@radix-ui/react-popover";
5565
6126
  import {
5566
- forwardRef as forwardRef24,
6127
+ forwardRef as forwardRef28,
5567
6128
  useCallback as useCallback13,
5568
6129
  useEffect as useEffect8,
5569
6130
  useRef as useRef9,
@@ -5571,7 +6132,7 @@ import {
5571
6132
  } from "react";
5572
6133
 
5573
6134
  // src/components/overlay-pointer.tsx
5574
- import { Fragment as Fragment2, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
6135
+ import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
5575
6136
  var TOOLTIP_POINTER = {
5576
6137
  width: 14,
5577
6138
  height: 5,
@@ -5592,7 +6153,7 @@ function OverlayPointerSvg({
5592
6153
  ...props
5593
6154
  }) {
5594
6155
  const isPopover = variant === "popover";
5595
- return /* @__PURE__ */ jsx34(
6156
+ return /* @__PURE__ */ jsx38(
5596
6157
  "svg",
5597
6158
  {
5598
6159
  ...props,
@@ -5605,16 +6166,16 @@ function OverlayPointerSvg({
5605
6166
  "aria-hidden": true,
5606
6167
  className,
5607
6168
  style: { ...style, width, height },
5608
- children: isPopover ? /* @__PURE__ */ jsxs25(Fragment2, { children: [
5609
- /* @__PURE__ */ jsx34("path", { d: path, className: "aviala-popover-content__arrow-outline" }),
5610
- /* @__PURE__ */ jsx34("path", { d: path, className: "aviala-popover-content__arrow-fill" })
5611
- ] }) : /* @__PURE__ */ jsx34("path", { d: path })
6169
+ children: isPopover ? /* @__PURE__ */ jsxs28(Fragment3, { children: [
6170
+ /* @__PURE__ */ jsx38("path", { d: path, className: "aviala-popover-content__arrow-outline" }),
6171
+ /* @__PURE__ */ jsx38("path", { d: path, className: "aviala-popover-content__arrow-fill" })
6172
+ ] }) : /* @__PURE__ */ jsx38("path", { d: path })
5612
6173
  }
5613
6174
  );
5614
6175
  }
5615
6176
 
5616
6177
  // src/components/popover.tsx
5617
- import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
6178
+ import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
5618
6179
  function Popover({
5619
6180
  open: openProp,
5620
6181
  defaultOpen = false,
@@ -5660,7 +6221,7 @@ function Popover({
5660
6221
  },
5661
6222
  [isControlled, onOpenChange]
5662
6223
  );
5663
- return /* @__PURE__ */ jsx35(
6224
+ return /* @__PURE__ */ jsx39(
5664
6225
  PopoverPrimitive6.Root,
5665
6226
  {
5666
6227
  open,
@@ -5672,7 +6233,7 @@ function Popover({
5672
6233
  }
5673
6234
  var PopoverTrigger = PopoverPrimitive6.Trigger;
5674
6235
  var PopoverAnchor = PopoverPrimitive6.Anchor;
5675
- var PopoverContent = forwardRef24(
6236
+ var PopoverContent = forwardRef28(
5676
6237
  ({
5677
6238
  className,
5678
6239
  children,
@@ -5683,7 +6244,7 @@ var PopoverContent = forwardRef24(
5683
6244
  showArrow = false,
5684
6245
  ...props
5685
6246
  }, ref) => {
5686
- const content = /* @__PURE__ */ jsxs26(
6247
+ const content = /* @__PURE__ */ jsxs29(
5687
6248
  PopoverPrimitive6.Content,
5688
6249
  {
5689
6250
  ref,
@@ -5693,14 +6254,14 @@ var PopoverContent = forwardRef24(
5693
6254
  className: cn("aviala-popover-content", className),
5694
6255
  ...props,
5695
6256
  children: [
5696
- /* @__PURE__ */ jsx35("div", { className: cn("aviala-popover-content__surface", typographyVariants({ level: "text" })), children }),
5697
- showArrow ? /* @__PURE__ */ jsx35(
6257
+ /* @__PURE__ */ jsx39("div", { className: cn("aviala-popover-content__surface", typographyVariants({ level: "text" })), children }),
6258
+ showArrow ? /* @__PURE__ */ jsx39(
5698
6259
  PopoverPrimitive6.Arrow,
5699
6260
  {
5700
6261
  asChild: true,
5701
6262
  width: POPOVER_POINTER.width,
5702
6263
  height: POPOVER_POINTER.height,
5703
- children: /* @__PURE__ */ jsx35(
6264
+ children: /* @__PURE__ */ jsx39(
5704
6265
  OverlayPointerSvg,
5705
6266
  {
5706
6267
  variant: "popover",
@@ -5716,23 +6277,23 @@ var PopoverContent = forwardRef24(
5716
6277
  }
5717
6278
  );
5718
6279
  if (!portalled) return content;
5719
- return /* @__PURE__ */ jsx35(PopoverPrimitive6.Portal, { children: content });
6280
+ return /* @__PURE__ */ jsx39(PopoverPrimitive6.Portal, { children: content });
5720
6281
  }
5721
6282
  );
5722
6283
  PopoverContent.displayName = PopoverPrimitive6.Content.displayName;
5723
6284
 
5724
6285
  // src/components/modal.tsx
5725
6286
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5726
- import { SymbolWrong } from "@aviala-design/icons";
5727
- import { cva as cva5 } from "class-variance-authority";
6287
+ import { SymbolWrong as SymbolWrong2 } from "@aviala-design/icons";
6288
+ import { cva as cva10 } from "class-variance-authority";
5728
6289
  import {
5729
- cloneElement as cloneElement7,
5730
- forwardRef as forwardRef25,
5731
- isValidElement as isValidElement11
6290
+ cloneElement as cloneElement9,
6291
+ forwardRef as forwardRef29,
6292
+ isValidElement as isValidElement13
5732
6293
  } from "react";
5733
- import { Fragment as Fragment3, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
6294
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
5734
6295
  var MODAL_ICON_SIZE = 16;
5735
- var modalContentVariants = cva5("aviala-modal-content", {
6296
+ var modalContentVariants = cva10("aviala-modal-content", {
5736
6297
  variants: {
5737
6298
  size: {
5738
6299
  default: "aviala-modal-content--size-default",
@@ -5745,7 +6306,7 @@ var modalContentVariants = cva5("aviala-modal-content", {
5745
6306
  });
5746
6307
  function renderModalIcon(node) {
5747
6308
  if (!node) return null;
5748
- const content = isValidElement11(node) && typeof node.type !== "string" ? cloneElement7(node, {
6309
+ const content = isValidElement13(node) && typeof node.type !== "string" ? cloneElement9(node, {
5749
6310
  width: MODAL_ICON_SIZE,
5750
6311
  height: MODAL_ICON_SIZE,
5751
6312
  className: cn(
@@ -5753,13 +6314,13 @@ function renderModalIcon(node) {
5753
6314
  "shrink-0"
5754
6315
  )
5755
6316
  }) : node;
5756
- return /* @__PURE__ */ jsx36("span", { className: "aviala-modal__icon", "aria-hidden": true, children: content });
6317
+ return /* @__PURE__ */ jsx40("span", { className: "aviala-modal__icon", "aria-hidden": true, children: content });
5757
6318
  }
5758
6319
  var Modal = DialogPrimitive.Root;
5759
6320
  var ModalTrigger = DialogPrimitive.Trigger;
5760
6321
  var ModalPortal = DialogPrimitive.Portal;
5761
6322
  var ModalClose = DialogPrimitive.Close;
5762
- var ModalOverlay = forwardRef25(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
6323
+ var ModalOverlay = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
5763
6324
  DialogPrimitive.Overlay,
5764
6325
  {
5765
6326
  ref,
@@ -5768,7 +6329,7 @@ var ModalOverlay = forwardRef25(({ className, ...props }, ref) => /* @__PURE__ *
5768
6329
  }
5769
6330
  ));
5770
6331
  ModalOverlay.displayName = DialogPrimitive.Overlay.displayName;
5771
- var ModalContent = forwardRef25(
6332
+ var ModalContent = forwardRef29(
5772
6333
  ({
5773
6334
  className,
5774
6335
  children,
@@ -5778,25 +6339,25 @@ var ModalContent = forwardRef25(
5778
6339
  onOpenAutoFocus,
5779
6340
  ...props
5780
6341
  }, ref) => {
5781
- const content = /* @__PURE__ */ jsxs27(Fragment3, { children: [
5782
- showOverlay ? /* @__PURE__ */ jsx36(ModalOverlay, {}) : null,
5783
- /* @__PURE__ */ jsx36(
6342
+ const content = /* @__PURE__ */ jsxs30(Fragment4, { children: [
6343
+ showOverlay ? /* @__PURE__ */ jsx40(ModalOverlay, {}) : null,
6344
+ /* @__PURE__ */ jsx40(
5784
6345
  DialogPrimitive.Content,
5785
6346
  {
5786
6347
  ref,
5787
6348
  className: cn(modalContentVariants({ size }), className),
5788
6349
  onOpenAutoFocus,
5789
6350
  ...props,
5790
- children: /* @__PURE__ */ jsx36("div", { className: "aviala-modal-content__surface", children })
6351
+ children: /* @__PURE__ */ jsx40("div", { className: "aviala-modal-content__surface", children })
5791
6352
  }
5792
6353
  )
5793
6354
  ] });
5794
6355
  if (!portalled) return content;
5795
- return /* @__PURE__ */ jsx36(DialogPrimitive.Portal, { children: content });
6356
+ return /* @__PURE__ */ jsx40(DialogPrimitive.Portal, { children: content });
5796
6357
  }
5797
6358
  );
5798
6359
  ModalContent.displayName = DialogPrimitive.Content.displayName;
5799
- var ModalHeader = forwardRef25(
6360
+ var ModalHeader = forwardRef29(
5800
6361
  ({
5801
6362
  className,
5802
6363
  children,
@@ -5805,10 +6366,10 @@ var ModalHeader = forwardRef25(
5805
6366
  showClose = true,
5806
6367
  closeLabel = "Close dialog",
5807
6368
  ...props
5808
- }, ref) => /* @__PURE__ */ jsx36("div", { ref, className: cn("aviala-modal__header", className), ...props, children: /* @__PURE__ */ jsxs27("div", { className: "aviala-modal__header-row", children: [
6369
+ }, ref) => /* @__PURE__ */ jsx40("div", { ref, className: cn("aviala-modal__header", className), ...props, children: /* @__PURE__ */ jsxs30("div", { className: "aviala-modal__header-row", children: [
5809
6370
  showIcon ? renderModalIcon(icon) : null,
5810
- /* @__PURE__ */ jsx36("div", { className: "aviala-modal__header-main", children }),
5811
- showClose ? /* @__PURE__ */ jsx36(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx36(
6371
+ /* @__PURE__ */ jsx40("div", { className: "aviala-modal__header-main", children }),
6372
+ showClose ? /* @__PURE__ */ jsx40(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx40(
5812
6373
  Link,
5813
6374
  {
5814
6375
  level: "text",
@@ -5816,28 +6377,28 @@ var ModalHeader = forwardRef25(
5816
6377
  iconOnly: true,
5817
6378
  "aria-label": closeLabel,
5818
6379
  className: "aviala-modal__close",
5819
- leftIcon: /* @__PURE__ */ jsx36(SymbolWrong, { "aria-hidden": true })
6380
+ leftIcon: /* @__PURE__ */ jsx40(SymbolWrong2, { "aria-hidden": true })
5820
6381
  }
5821
6382
  ) }) : null
5822
6383
  ] }) })
5823
6384
  );
5824
6385
  ModalHeader.displayName = "ModalHeader";
5825
- var ModalTitle = forwardRef25(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx36(DialogPrimitive.Title, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx36(Typography, { level: "text", className: cn("aviala-modal__title", className), children }) }));
6386
+ var ModalTitle = forwardRef29(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40(DialogPrimitive.Title, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx40(Typography, { level: "text", className: cn("aviala-modal__title", className), children }) }));
5826
6387
  ModalTitle.displayName = DialogPrimitive.Title.displayName;
5827
- var ModalDescription = forwardRef25(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx36(DialogPrimitive.Description, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx36(Typography, { level: "caption", className: cn("aviala-modal__description", className), children }) }));
6388
+ var ModalDescription = forwardRef29(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40(DialogPrimitive.Description, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx40(Typography, { level: "caption", className: cn("aviala-modal__description", className), children }) }));
5828
6389
  ModalDescription.displayName = DialogPrimitive.Description.displayName;
5829
6390
  function ModalHeaderText({
5830
6391
  title,
5831
6392
  description,
5832
6393
  ...props
5833
6394
  }) {
5834
- return /* @__PURE__ */ jsx36(ModalHeader, { ...props, children: /* @__PURE__ */ jsxs27("div", { className: "aviala-modal__header-typeface", children: [
5835
- /* @__PURE__ */ jsx36(ModalTitle, { children: title }),
5836
- description ? /* @__PURE__ */ jsx36(ModalDescription, { children: description }) : null
6395
+ return /* @__PURE__ */ jsx40(ModalHeader, { ...props, children: /* @__PURE__ */ jsxs30("div", { className: "aviala-modal__header-typeface", children: [
6396
+ /* @__PURE__ */ jsx40(ModalTitle, { children: title }),
6397
+ description ? /* @__PURE__ */ jsx40(ModalDescription, { children: description }) : null
5837
6398
  ] }) });
5838
6399
  }
5839
- var ModalBody = forwardRef25(
5840
- ({ className, children, layout = "default", title, description, ...props }, ref) => /* @__PURE__ */ jsx36("div", { ref, className: cn("aviala-modal__body", className), ...props, children: layout === "text" ? /* @__PURE__ */ jsx36(
6400
+ var ModalBody = forwardRef29(
6401
+ ({ className, children, layout = "default", title, description, ...props }, ref) => /* @__PURE__ */ jsx40("div", { ref, className: cn("aviala-modal__body", className), ...props, children: layout === "text" ? /* @__PURE__ */ jsx40(
5841
6402
  Typeface,
5842
6403
  {
5843
6404
  className: "aviala-modal__body-typeface",
@@ -5848,22 +6409,22 @@ var ModalBody = forwardRef25(
5848
6409
  ) : children })
5849
6410
  );
5850
6411
  ModalBody.displayName = "ModalBody";
5851
- var ModalFooter = forwardRef25(
5852
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36("div", { ref, className: cn("aviala-modal__footer", className), ...props })
6412
+ var ModalFooter = forwardRef29(
6413
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx40("div", { ref, className: cn("aviala-modal__footer", className), ...props })
5853
6414
  );
5854
6415
  ModalFooter.displayName = "ModalFooter";
5855
6416
 
5856
6417
  // src/components/tooltip.tsx
5857
6418
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5858
- import { forwardRef as forwardRef26 } from "react";
5859
- import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
6419
+ import { forwardRef as forwardRef30 } from "react";
6420
+ import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
5860
6421
  var TOOLTIP_DELAY_DURATION = 300;
5861
6422
  function TooltipProvider({
5862
6423
  delayDuration = TOOLTIP_DELAY_DURATION,
5863
6424
  skipDelayDuration = 0,
5864
6425
  ...props
5865
6426
  }) {
5866
- return /* @__PURE__ */ jsx37(
6427
+ return /* @__PURE__ */ jsx41(
5867
6428
  TooltipPrimitive.Provider,
5868
6429
  {
5869
6430
  delayDuration,
@@ -5874,7 +6435,7 @@ function TooltipProvider({
5874
6435
  }
5875
6436
  var Tooltip = TooltipPrimitive.Root;
5876
6437
  var TooltipTrigger = TooltipPrimitive.Trigger;
5877
- var TooltipContent = forwardRef26(
6438
+ var TooltipContent = forwardRef30(
5878
6439
  ({
5879
6440
  className,
5880
6441
  children,
@@ -5882,7 +6443,7 @@ var TooltipContent = forwardRef26(
5882
6443
  collisionPadding = 8,
5883
6444
  showArrow = true,
5884
6445
  ...props
5885
- }, ref) => /* @__PURE__ */ jsx37(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs28(
6446
+ }, ref) => /* @__PURE__ */ jsx41(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs31(
5886
6447
  TooltipPrimitive.Content,
5887
6448
  {
5888
6449
  ref,
@@ -5891,14 +6452,14 @@ var TooltipContent = forwardRef26(
5891
6452
  className: cn("aviala-tooltip-content", className),
5892
6453
  ...props,
5893
6454
  children: [
5894
- /* @__PURE__ */ jsx37("div", { className: cn("aviala-tooltip-content__surface", typographyVariants({ level: "caption" })), children }),
5895
- showArrow ? /* @__PURE__ */ jsx37(
6455
+ /* @__PURE__ */ jsx41("div", { className: cn("aviala-tooltip-content__surface", typographyVariants({ level: "caption" })), children }),
6456
+ showArrow ? /* @__PURE__ */ jsx41(
5896
6457
  TooltipPrimitive.Arrow,
5897
6458
  {
5898
6459
  asChild: true,
5899
6460
  width: TOOLTIP_POINTER.width,
5900
6461
  height: TOOLTIP_POINTER.height,
5901
- children: /* @__PURE__ */ jsx37(
6462
+ children: /* @__PURE__ */ jsx41(
5902
6463
  OverlayPointerSvg,
5903
6464
  {
5904
6465
  className: "aviala-tooltip-content__arrow",
@@ -5916,23 +6477,23 @@ var TooltipContent = forwardRef26(
5916
6477
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
5917
6478
 
5918
6479
  // src/components/feedback.tsx
5919
- import { cva as cva6 } from "class-variance-authority";
6480
+ import { cva as cva11 } from "class-variance-authority";
5920
6481
  import {
5921
6482
  GeneralNotification,
5922
6483
  SymbolInformationCircle,
5923
6484
  SymbolRightCircle,
5924
6485
  SymbolWarningCircle,
5925
- SymbolWrong as SymbolWrong2,
6486
+ SymbolWrong as SymbolWrong3,
5926
6487
  SymbolWrongCircle
5927
6488
  } from "@aviala-design/icons";
5928
6489
  import {
5929
- cloneElement as cloneElement8,
5930
- forwardRef as forwardRef27,
5931
- isValidElement as isValidElement12
6490
+ cloneElement as cloneElement10,
6491
+ forwardRef as forwardRef31,
6492
+ isValidElement as isValidElement14
5932
6493
  } from "react";
5933
- import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
6494
+ import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
5934
6495
  var FEEDBACK_ICON_SIZE = 22;
5935
- var feedbackVariants = cva6("aviala-feedback", {
6496
+ var feedbackVariants = cva11("aviala-feedback", {
5936
6497
  variants: {
5937
6498
  type: {
5938
6499
  information: "aviala-feedback--type-information",
@@ -5958,7 +6519,7 @@ var feedbackVariants = cva6("aviala-feedback", {
5958
6519
  });
5959
6520
  function renderFeedbackIcon(node) {
5960
6521
  if (!node) return null;
5961
- const content = isValidElement12(node) && typeof node.type !== "string" ? cloneElement8(node, {
6522
+ const content = isValidElement14(node) && typeof node.type !== "string" ? cloneElement10(node, {
5962
6523
  width: FEEDBACK_ICON_SIZE,
5963
6524
  height: FEEDBACK_ICON_SIZE,
5964
6525
  className: cn(
@@ -5966,25 +6527,25 @@ function renderFeedbackIcon(node) {
5966
6527
  "shrink-0"
5967
6528
  )
5968
6529
  }) : node;
5969
- return /* @__PURE__ */ jsx38("span", { className: "aviala-feedback__icon", "aria-hidden": true, children: content });
6530
+ return /* @__PURE__ */ jsx42("span", { className: "aviala-feedback__icon", "aria-hidden": true, children: content });
5970
6531
  }
5971
6532
  function defaultStatusIcon(type, mode) {
5972
6533
  const iconMode = mode === "primary" ? "fill" : "fill";
5973
6534
  const thickness = "Regular";
5974
6535
  switch (type) {
5975
6536
  case "information":
5976
- return /* @__PURE__ */ jsx38(SymbolInformationCircle, { thickness, mode: iconMode, "aria-hidden": true });
6537
+ return /* @__PURE__ */ jsx42(SymbolInformationCircle, { thickness, mode: iconMode, "aria-hidden": true });
5977
6538
  case "warning":
5978
- return /* @__PURE__ */ jsx38(SymbolWarningCircle, { thickness, mode: iconMode, "aria-hidden": true });
6539
+ return /* @__PURE__ */ jsx42(SymbolWarningCircle, { thickness, mode: iconMode, "aria-hidden": true });
5979
6540
  case "wrong":
5980
- return /* @__PURE__ */ jsx38(SymbolWrongCircle, { thickness, mode: iconMode, "aria-hidden": true });
6541
+ return /* @__PURE__ */ jsx42(SymbolWrongCircle, { thickness, mode: iconMode, "aria-hidden": true });
5981
6542
  case "success":
5982
- return /* @__PURE__ */ jsx38(SymbolRightCircle, { thickness, mode: iconMode, "aria-hidden": true });
6543
+ return /* @__PURE__ */ jsx42(SymbolRightCircle, { thickness, mode: iconMode, "aria-hidden": true });
5983
6544
  case "normal":
5984
- return /* @__PURE__ */ jsx38(GeneralNotification, { thickness, mode: "default", "aria-hidden": true });
6545
+ return /* @__PURE__ */ jsx42(GeneralNotification, { thickness, mode: "default", "aria-hidden": true });
5985
6546
  }
5986
6547
  }
5987
- var Feedback = forwardRef27(
6548
+ var Feedback = forwardRef31(
5988
6549
  ({
5989
6550
  className,
5990
6551
  type = "information",
@@ -6006,7 +6567,7 @@ var Feedback = forwardRef27(
6006
6567
  const tone = mode === "primary" ? "white" : "default";
6007
6568
  const isSmall = resolvedSize === "small";
6008
6569
  const resolvedRole = resolvedType === "wrong" ? "alert" : "status";
6009
- return /* @__PURE__ */ jsx38(
6570
+ return /* @__PURE__ */ jsx42(
6010
6571
  "div",
6011
6572
  {
6012
6573
  ref,
@@ -6020,9 +6581,9 @@ var Feedback = forwardRef27(
6020
6581
  "data-size": resolvedSize,
6021
6582
  "data-mode": mode,
6022
6583
  ...props,
6023
- children: /* @__PURE__ */ jsxs29("div", { className: "aviala-feedback__body", children: [
6584
+ children: /* @__PURE__ */ jsxs32("div", { className: "aviala-feedback__body", children: [
6024
6585
  renderFeedbackIcon(icon ?? defaultStatusIcon(resolvedType, mode)),
6025
- isSmall ? /* @__PURE__ */ jsx38(Typography, { level: "text", tone, className: "aviala-feedback__title", children: title }) : /* @__PURE__ */ jsx38(
6586
+ isSmall ? /* @__PURE__ */ jsx42(Typography, { level: "text", tone, className: "aviala-feedback__title", children: title }) : /* @__PURE__ */ jsx42(
6026
6587
  Typeface,
6027
6588
  {
6028
6589
  className: "aviala-feedback__typeface",
@@ -6032,7 +6593,7 @@ var Feedback = forwardRef27(
6032
6593
  tone
6033
6594
  }
6034
6595
  ),
6035
- action ? /* @__PURE__ */ jsx38(
6596
+ action ? /* @__PURE__ */ jsx42(
6036
6597
  Link,
6037
6598
  {
6038
6599
  level: "text",
@@ -6048,7 +6609,7 @@ var Feedback = forwardRef27(
6048
6609
  children: action
6049
6610
  }
6050
6611
  ) : null,
6051
- showClose ? /* @__PURE__ */ jsx38(
6612
+ showClose ? /* @__PURE__ */ jsx42(
6052
6613
  Link,
6053
6614
  {
6054
6615
  level: "text",
@@ -6057,7 +6618,7 @@ var Feedback = forwardRef27(
6057
6618
  href: onClose ? "#" : void 0,
6058
6619
  "aria-label": closeLabel,
6059
6620
  className: "aviala-feedback__close",
6060
- leftIcon: /* @__PURE__ */ jsx38(SymbolWrong2, { "aria-hidden": true }),
6621
+ leftIcon: /* @__PURE__ */ jsx42(SymbolWrong3, { "aria-hidden": true }),
6061
6622
  onClick: (event) => {
6062
6623
  if (onClose) {
6063
6624
  event.preventDefault();
@@ -6078,18 +6639,18 @@ import {
6078
6639
  SymbolInformationCircle as SymbolInformationCircle2,
6079
6640
  SymbolRightCircle as SymbolRightCircle2,
6080
6641
  SymbolWarningCircle as SymbolWarningCircle2,
6081
- SymbolWrong as SymbolWrong3,
6642
+ SymbolWrong as SymbolWrong4,
6082
6643
  SymbolWrongCircle as SymbolWrongCircle2
6083
6644
  } from "@aviala-design/icons";
6084
- import { cva as cva7 } from "class-variance-authority";
6645
+ import { cva as cva12 } from "class-variance-authority";
6085
6646
  import {
6086
- cloneElement as cloneElement9,
6087
- forwardRef as forwardRef28,
6088
- isValidElement as isValidElement13
6647
+ cloneElement as cloneElement11,
6648
+ forwardRef as forwardRef32,
6649
+ isValidElement as isValidElement15
6089
6650
  } from "react";
6090
- import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
6651
+ import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
6091
6652
  var ALERT_ICON_SIZE = 16;
6092
- var alertVariants = cva7("aviala-alert", {
6653
+ var alertVariants = cva12("aviala-alert", {
6093
6654
  variants: {
6094
6655
  type: {
6095
6656
  info: "aviala-alert--type-info",
@@ -6115,7 +6676,7 @@ var alertVariants = cva7("aviala-alert", {
6115
6676
  });
6116
6677
  function renderAlertIcon(node) {
6117
6678
  if (!node) return null;
6118
- const content = isValidElement13(node) && typeof node.type !== "string" ? cloneElement9(node, {
6679
+ const content = isValidElement15(node) && typeof node.type !== "string" ? cloneElement11(node, {
6119
6680
  width: ALERT_ICON_SIZE,
6120
6681
  height: ALERT_ICON_SIZE,
6121
6682
  className: cn(
@@ -6123,23 +6684,23 @@ function renderAlertIcon(node) {
6123
6684
  "shrink-0"
6124
6685
  )
6125
6686
  }) : node;
6126
- return /* @__PURE__ */ jsx39("span", { className: "aviala-alert__icon", "aria-hidden": true, children: content });
6687
+ return /* @__PURE__ */ jsx43("span", { className: "aviala-alert__icon", "aria-hidden": true, children: content });
6127
6688
  }
6128
6689
  function defaultStatusIcon2(type) {
6129
6690
  const iconProps = { thickness: "Regular", mode: "fill", "aria-hidden": true };
6130
6691
  switch (type) {
6131
6692
  case "info":
6132
6693
  case "neutral":
6133
- return /* @__PURE__ */ jsx39(SymbolInformationCircle2, { ...iconProps });
6694
+ return /* @__PURE__ */ jsx43(SymbolInformationCircle2, { ...iconProps });
6134
6695
  case "warning":
6135
- return /* @__PURE__ */ jsx39(SymbolWarningCircle2, { ...iconProps });
6696
+ return /* @__PURE__ */ jsx43(SymbolWarningCircle2, { ...iconProps });
6136
6697
  case "error":
6137
- return /* @__PURE__ */ jsx39(SymbolWrongCircle2, { ...iconProps });
6698
+ return /* @__PURE__ */ jsx43(SymbolWrongCircle2, { ...iconProps });
6138
6699
  case "success":
6139
- return /* @__PURE__ */ jsx39(SymbolRightCircle2, { ...iconProps });
6700
+ return /* @__PURE__ */ jsx43(SymbolRightCircle2, { ...iconProps });
6140
6701
  }
6141
6702
  }
6142
- var Alert = forwardRef28(
6703
+ var Alert = forwardRef32(
6143
6704
  ({
6144
6705
  className,
6145
6706
  type = "info",
@@ -6165,7 +6726,7 @@ var Alert = forwardRef28(
6165
6726
  const resolvedType = type ?? "info";
6166
6727
  const resolvedRole = resolvedType === "error" ? "alert" : "status";
6167
6728
  const hasActions = showActions && (action || secondaryAction);
6168
- return /* @__PURE__ */ jsxs30(
6729
+ return /* @__PURE__ */ jsxs33(
6169
6730
  "div",
6170
6731
  {
6171
6732
  ref,
@@ -6177,9 +6738,9 @@ var Alert = forwardRef28(
6177
6738
  "data-appearance": appearance,
6178
6739
  ...props,
6179
6740
  children: [
6180
- /* @__PURE__ */ jsxs30("div", { className: "aviala-alert__body", children: [
6741
+ /* @__PURE__ */ jsxs33("div", { className: "aviala-alert__body", children: [
6181
6742
  showIcon ? renderAlertIcon(icon ?? defaultStatusIcon2(resolvedType)) : null,
6182
- isSmall ? /* @__PURE__ */ jsx39(Typography, { level: "text", className: "aviala-alert__title", children: title }) : /* @__PURE__ */ jsx39(
6743
+ isSmall ? /* @__PURE__ */ jsx43(Typography, { level: "text", className: "aviala-alert__title", children: title }) : /* @__PURE__ */ jsx43(
6183
6744
  Typeface,
6184
6745
  {
6185
6746
  className: "aviala-alert__typeface",
@@ -6188,7 +6749,7 @@ var Alert = forwardRef28(
6188
6749
  secondary: description
6189
6750
  }
6190
6751
  ),
6191
- quickAction ? /* @__PURE__ */ jsx39(
6752
+ quickAction ? /* @__PURE__ */ jsx43(
6192
6753
  Link,
6193
6754
  {
6194
6755
  level: "text",
@@ -6204,7 +6765,7 @@ var Alert = forwardRef28(
6204
6765
  children: quickAction
6205
6766
  }
6206
6767
  ) : null,
6207
- dismissible ? /* @__PURE__ */ jsx39(
6768
+ dismissible ? /* @__PURE__ */ jsx43(
6208
6769
  Link,
6209
6770
  {
6210
6771
  level: "text",
@@ -6213,7 +6774,7 @@ var Alert = forwardRef28(
6213
6774
  href: onDismiss ? "#" : void 0,
6214
6775
  "aria-label": closeLabel,
6215
6776
  className: "aviala-alert__close",
6216
- leftIcon: /* @__PURE__ */ jsx39(SymbolWrong3, { "aria-hidden": true }),
6777
+ leftIcon: /* @__PURE__ */ jsx43(SymbolWrong4, { "aria-hidden": true }),
6217
6778
  onClick: (event) => {
6218
6779
  if (onDismiss) {
6219
6780
  event.preventDefault();
@@ -6223,8 +6784,8 @@ var Alert = forwardRef28(
6223
6784
  }
6224
6785
  ) : null
6225
6786
  ] }),
6226
- hasActions ? /* @__PURE__ */ jsxs30("div", { className: "aviala-alert__actions", children: [
6227
- action ? /* @__PURE__ */ jsx39(
6787
+ hasActions ? /* @__PURE__ */ jsxs33("div", { className: "aviala-alert__actions", children: [
6788
+ action ? /* @__PURE__ */ jsx43(
6228
6789
  Link,
6229
6790
  {
6230
6791
  level: "caption",
@@ -6240,7 +6801,7 @@ var Alert = forwardRef28(
6240
6801
  children: action
6241
6802
  }
6242
6803
  ) : null,
6243
- secondaryAction ? /* @__PURE__ */ jsx39(
6804
+ secondaryAction ? /* @__PURE__ */ jsx43(
6244
6805
  Link,
6245
6806
  {
6246
6807
  level: "caption",
@@ -6270,34 +6831,34 @@ import {
6270
6831
  GeneralSetting
6271
6832
  } from "@aviala-design/icons";
6272
6833
  import {
6273
- cloneElement as cloneElement10,
6274
- forwardRef as forwardRef29,
6275
- isValidElement as isValidElement14
6834
+ cloneElement as cloneElement12,
6835
+ forwardRef as forwardRef33,
6836
+ isValidElement as isValidElement16
6276
6837
  } from "react";
6277
- import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
6278
- var List = forwardRef29(
6279
- ({ className, title, children, ...props }, ref) => /* @__PURE__ */ jsxs31("div", { ref, className: cn("aviala-list", className), role: "list", ...props, children: [
6280
- title != null ? /* @__PURE__ */ jsx40(ListTitle, { children: title }) : null,
6281
- /* @__PURE__ */ jsx40(ListGroup, { children })
6838
+ import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
6839
+ var List = forwardRef33(
6840
+ ({ className, title, children, ...props }, ref) => /* @__PURE__ */ jsxs34("div", { ref, className: cn("aviala-list", className), ...props, children: [
6841
+ title != null ? /* @__PURE__ */ jsx44(ListTitle, { children: title }) : null,
6842
+ /* @__PURE__ */ jsx44(ListGroup, { children })
6282
6843
  ] })
6283
6844
  );
6284
6845
  List.displayName = "List";
6285
- var ListTitle = forwardRef29(
6286
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40("div", { ref, className: cn("aviala-list-title", className), ...props, children: /* @__PURE__ */ jsx40("span", { className: cn(typographyVariants({ level: "text" })), children }) })
6846
+ var ListTitle = forwardRef33(
6847
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx44("div", { ref, className: cn("aviala-list-title", className), ...props, children: /* @__PURE__ */ jsx44("span", { className: cn(typographyVariants({ level: "text" })), children }) })
6287
6848
  );
6288
6849
  ListTitle.displayName = "ListTitle";
6289
- var ListGroup = forwardRef29(
6290
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40("div", { ref, className: cn("aviala-list-group", className), ...props, children })
6850
+ var ListGroup = forwardRef33(
6851
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx44("div", { ref, className: cn("aviala-list-group", className), role: "list", ...props, children })
6291
6852
  );
6292
6853
  ListGroup.displayName = "ListGroup";
6293
6854
  function ListItemGroup({ label, children, className }) {
6294
- return /* @__PURE__ */ jsxs31("div", { className: cn("aviala-list", className), children: [
6295
- label != null ? /* @__PURE__ */ jsx40(ListTitle, { children: label }) : null,
6296
- /* @__PURE__ */ jsx40(ListGroup, { children })
6855
+ return /* @__PURE__ */ jsxs34("div", { className: cn("aviala-list", className), children: [
6856
+ label != null ? /* @__PURE__ */ jsx44(ListTitle, { children: label }) : null,
6857
+ /* @__PURE__ */ jsx44(ListGroup, { children })
6297
6858
  ] });
6298
6859
  }
6299
- var ListDivider = forwardRef29(
6300
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
6860
+ var ListDivider = forwardRef33(
6861
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
6301
6862
  "span",
6302
6863
  {
6303
6864
  ref,
@@ -6308,15 +6869,15 @@ var ListDivider = forwardRef29(
6308
6869
  )
6309
6870
  );
6310
6871
  ListDivider.displayName = "ListDivider";
6311
- var ListSeparator = forwardRef29(
6312
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx40("hr", { ref, className: cn("aviala-list-separator", className), ...props })
6872
+ var ListSeparator = forwardRef33(
6873
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx44("hr", { ref, className: cn("aviala-list-separator", className), ...props })
6313
6874
  );
6314
6875
  ListSeparator.displayName = "ListSeparator";
6315
6876
  function renderLeadingIcon(node, leading) {
6316
6877
  if (leading === "none") return null;
6317
6878
  const iconSize = leading === "shaped" ? 20 : 22;
6318
- const content = node ?? (leading === "shaped" ? /* @__PURE__ */ jsx40(GeneralSetting, { "aria-hidden": true }) : /* @__PURE__ */ jsx40(GeneralSetting, { "aria-hidden": true }));
6319
- const rendered = isValidElement14(content) && typeof content.type !== "string" ? cloneElement10(content, {
6879
+ const content = node ?? (leading === "shaped" ? /* @__PURE__ */ jsx44(GeneralSetting, { "aria-hidden": true }) : /* @__PURE__ */ jsx44(GeneralSetting, { "aria-hidden": true }));
6880
+ const rendered = isValidElement16(content) && typeof content.type !== "string" ? cloneElement12(content, {
6320
6881
  width: iconSize,
6321
6882
  height: iconSize,
6322
6883
  className: cn(
@@ -6324,7 +6885,7 @@ function renderLeadingIcon(node, leading) {
6324
6885
  "shrink-0"
6325
6886
  )
6326
6887
  }) : content;
6327
- return /* @__PURE__ */ jsx40("span", { className: "aviala-list-item__icon", children: /* @__PURE__ */ jsx40(
6888
+ return /* @__PURE__ */ jsx44("span", { className: "aviala-list-item__icon", children: /* @__PURE__ */ jsx44(
6328
6889
  "span",
6329
6890
  {
6330
6891
  className: cn(
@@ -6334,7 +6895,7 @@ function renderLeadingIcon(node, leading) {
6334
6895
  }
6335
6896
  ) });
6336
6897
  }
6337
- var ListItem = forwardRef29(
6898
+ var ListItem = forwardRef33(
6338
6899
  ({
6339
6900
  className,
6340
6901
  itemType = "select",
@@ -6355,44 +6916,44 @@ var ListItem = forwardRef29(
6355
6916
  ...props
6356
6917
  }, ref) => {
6357
6918
  const isInteractive = interactive ?? onClick != null;
6358
- const primaryAction = action ?? /* @__PURE__ */ jsx40(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx40(GeneralSetting, { "aria-hidden": true }), children: actionLabel });
6919
+ const primaryAction = action ?? /* @__PURE__ */ jsx44(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx44(GeneralSetting, { "aria-hidden": true }), children: actionLabel });
6359
6920
  const renderTrailing = () => {
6360
6921
  if (trailing !== void 0) return trailing;
6361
6922
  switch (itemType) {
6362
6923
  case "action":
6363
- return /* @__PURE__ */ jsxs31("div", { className: "aviala-list-item__more", children: [
6364
- /* @__PURE__ */ jsxs31("div", { className: "aviala-list-item__trailing", children: [
6924
+ return /* @__PURE__ */ jsxs34("div", { className: "aviala-list-item__more", children: [
6925
+ /* @__PURE__ */ jsxs34("div", { className: "aviala-list-item__trailing", children: [
6365
6926
  primaryAction,
6366
- secondaryAction ?? /* @__PURE__ */ jsx40(
6927
+ secondaryAction ?? /* @__PURE__ */ jsx44(
6367
6928
  Button,
6368
6929
  {
6369
6930
  mode: "default",
6370
6931
  size: "regular",
6371
6932
  iconOnly: true,
6372
6933
  "aria-label": "More",
6373
- leftIcon: /* @__PURE__ */ jsx40(GeneralSetting, { "aria-hidden": true })
6934
+ leftIcon: /* @__PURE__ */ jsx44(GeneralSetting, { "aria-hidden": true })
6374
6935
  }
6375
6936
  )
6376
6937
  ] }),
6377
- /* @__PURE__ */ jsx40(ListDivider, {}),
6378
- /* @__PURE__ */ jsx40("span", { className: "aviala-list-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx40(DirectionArrowRightLight2, { width: 18, height: 18 }) })
6938
+ /* @__PURE__ */ jsx44(ListDivider, {}),
6939
+ /* @__PURE__ */ jsx44("span", { className: "aviala-list-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx44(DirectionArrowRightLight2, { width: 18, height: 18 }) })
6379
6940
  ] });
6380
6941
  case "switch":
6381
- return /* @__PURE__ */ jsxs31("div", { className: "aviala-list-item__trailing", children: [
6942
+ return /* @__PURE__ */ jsxs34("div", { className: "aviala-list-item__trailing", children: [
6382
6943
  primaryAction,
6383
- /* @__PURE__ */ jsx40(ListDivider, {}),
6384
- /* @__PURE__ */ jsx40(Switch, { defaultChecked: true, ...switchProps })
6944
+ /* @__PURE__ */ jsx44(ListDivider, {}),
6945
+ /* @__PURE__ */ jsx44(Switch, { ...switchProps })
6385
6946
  ] });
6386
6947
  case "select":
6387
6948
  default:
6388
- return /* @__PURE__ */ jsxs31("div", { className: "aviala-list-item__trailing", children: [
6949
+ return /* @__PURE__ */ jsxs34("div", { className: "aviala-list-item__trailing", children: [
6389
6950
  primaryAction,
6390
- /* @__PURE__ */ jsx40(ListDivider, {}),
6391
- /* @__PURE__ */ jsx40("span", { className: "aviala-list-item__select", children: select })
6951
+ /* @__PURE__ */ jsx44(ListDivider, {}),
6952
+ /* @__PURE__ */ jsx44("span", { className: "aviala-list-item__select", children: select })
6392
6953
  ] });
6393
6954
  }
6394
6955
  };
6395
- return /* @__PURE__ */ jsxs31(
6956
+ return /* @__PURE__ */ jsxs34(
6396
6957
  "div",
6397
6958
  {
6398
6959
  ref,
@@ -6407,8 +6968,8 @@ var ListItem = forwardRef29(
6407
6968
  ...props,
6408
6969
  children: [
6409
6970
  renderLeadingIcon(icon, leading),
6410
- /* @__PURE__ */ jsx40("div", { className: "aviala-list-item__body", children: /* @__PURE__ */ jsxs31("div", { className: "aviala-list-item__content", children: [
6411
- /* @__PURE__ */ jsx40("div", { className: "aviala-list-item__head", children: /* @__PURE__ */ jsx40(Typeface, { content: "textCaption", primary: title, secondary: subtitle }) }),
6971
+ /* @__PURE__ */ jsx44("div", { className: "aviala-list-item__body", children: /* @__PURE__ */ jsxs34("div", { className: "aviala-list-item__content", children: [
6972
+ /* @__PURE__ */ jsx44("div", { className: "aviala-list-item__head", children: /* @__PURE__ */ jsx44(Typeface, { content: "textCaption", primary: title, secondary: subtitle }) }),
6412
6973
  renderTrailing()
6413
6974
  ] }) })
6414
6975
  ]
@@ -6422,14 +6983,14 @@ ListItem.displayName = "ListItem";
6422
6983
  import { Slot as Slot5 } from "@radix-ui/react-slot";
6423
6984
  import {
6424
6985
  createContext as createContext8,
6425
- forwardRef as forwardRef30,
6986
+ forwardRef as forwardRef34,
6426
6987
  useCallback as useCallback14,
6427
6988
  useContext as useContext8,
6428
6989
  useLayoutEffect as useLayoutEffect5,
6429
6990
  useRef as useRef10,
6430
6991
  useState as useState13
6431
6992
  } from "react";
6432
- import { Fragment as Fragment4, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
6993
+ import { Fragment as Fragment5, jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
6433
6994
  function navigationItemButtonMode(active) {
6434
6995
  return active ? "second" : "noBackgroundCustom";
6435
6996
  }
@@ -6463,21 +7024,20 @@ function readIndicatorToken(el, name, fallback) {
6463
7024
  const parsed = parseFloat(value);
6464
7025
  return Number.isFinite(parsed) ? parsed : fallback;
6465
7026
  }
7027
+ function isInsideCollapsedGroup(item) {
7028
+ return item.closest('.aviala-navigation-item-group[data-expanded="false"]') !== null;
7029
+ }
6466
7030
  function findActiveNavigationItem(group) {
6467
- const activeItems = group.querySelectorAll(
6468
- '.aviala-navigation-item[data-active="true"]'
6469
- );
7031
+ const activeItems = Array.from(
7032
+ group.querySelectorAll(
7033
+ '.aviala-navigation-item[data-active="true"]'
7034
+ )
7035
+ ).filter((item) => !isInsideCollapsedGroup(item));
6470
7036
  if (activeItems.length === 0) return null;
6471
- for (const item of activeItems) {
6472
- if (item.getAttribute("data-item-type") === "child") {
6473
- const collapsedGroup = item.closest(
6474
- '.aviala-navigation-item-group[data-expanded="false"]'
6475
- );
6476
- if (collapsedGroup) continue;
6477
- return item;
6478
- }
6479
- }
6480
- return activeItems[0] ?? null;
7037
+ const activeChild = activeItems.find(
7038
+ (item) => item.getAttribute("data-item-type") === "child"
7039
+ );
7040
+ return activeChild ?? activeItems[0];
6481
7041
  }
6482
7042
  function measureNavigationIndicator(group, direction) {
6483
7043
  const item = findActiveNavigationItem(group);
@@ -6807,16 +7367,16 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
6807
7367
  ]);
6808
7368
  return onIndicatorRef;
6809
7369
  }
6810
- var Navigation = forwardRef30(
7370
+ var Navigation = forwardRef34(
6811
7371
  ({
6812
7372
  className,
6813
- as: Tag = "nav",
7373
+ as: Tag2 = "nav",
6814
7374
  background = "default",
6815
7375
  direction = "vertical",
6816
7376
  dividingLine = false,
6817
7377
  ...props
6818
- }, ref) => /* @__PURE__ */ jsx41(NavigationDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ jsx41(
6819
- Tag,
7378
+ }, ref) => /* @__PURE__ */ jsx45(NavigationDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ jsx45(
7379
+ Tag2,
6820
7380
  {
6821
7381
  ref,
6822
7382
  className: cn("aviala-navigation", className),
@@ -6828,8 +7388,8 @@ var Navigation = forwardRef30(
6828
7388
  ) })
6829
7389
  );
6830
7390
  Navigation.displayName = "Navigation";
6831
- var NavigationBrand = forwardRef30(
6832
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
7391
+ var NavigationBrand = forwardRef34(
7392
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
6833
7393
  "div",
6834
7394
  {
6835
7395
  ref,
@@ -6839,30 +7399,30 @@ var NavigationBrand = forwardRef30(
6839
7399
  )
6840
7400
  );
6841
7401
  NavigationBrand.displayName = "NavigationBrand";
6842
- var NavigationBrandTitle = forwardRef30(({ className, asChild = false, children, ...props }, ref) => {
7402
+ var NavigationBrandTitle = forwardRef34(({ className, asChild = false, children, ...props }, ref) => {
6843
7403
  const Comp = asChild ? Slot5 : "a";
6844
- return /* @__PURE__ */ jsx41(
7404
+ return /* @__PURE__ */ jsx45(
6845
7405
  Comp,
6846
7406
  {
6847
7407
  ref,
6848
- className: cn("aviala-navigation-brand__title", className),
7408
+ className: cn("aviala-navigation-brand__title aviala-focus-ring", className),
6849
7409
  ...props,
6850
- children: asChild ? children : /* @__PURE__ */ jsx41(Typography, { level: "text", as: "span", children })
7410
+ children: asChild ? children : /* @__PURE__ */ jsx45(Typography, { level: "text", as: "span", children })
6851
7411
  }
6852
7412
  );
6853
7413
  });
6854
7414
  NavigationBrandTitle.displayName = "NavigationBrandTitle";
6855
- var NavigationSection = forwardRef30(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx41(
7415
+ var NavigationSection = forwardRef34(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx45(
6856
7416
  "div",
6857
7417
  {
6858
7418
  ref,
6859
7419
  className: cn("aviala-navigation-section", className),
6860
7420
  ...props,
6861
- children: /* @__PURE__ */ jsx41(Typography, { level: "caption", as: "p", children })
7421
+ children: /* @__PURE__ */ jsx45(Typography, { level: "caption", as: "p", children })
6862
7422
  }
6863
7423
  ));
6864
7424
  NavigationSection.displayName = "NavigationSection";
6865
- var NavigationGroup = forwardRef30(
7425
+ var NavigationGroup = forwardRef34(
6866
7426
  ({ className, children, ...props }, ref) => {
6867
7427
  const direction = useNavigationDirection();
6868
7428
  const layoutKey = useThemeLayoutKey();
@@ -6883,14 +7443,14 @@ var NavigationGroup = forwardRef30(
6883
7443
  },
6884
7444
  [ref]
6885
7445
  );
6886
- return /* @__PURE__ */ jsxs32(
7446
+ return /* @__PURE__ */ jsxs35(
6887
7447
  "div",
6888
7448
  {
6889
7449
  ref: setRefs,
6890
7450
  className: cn("aviala-navigation-group", className),
6891
7451
  ...props,
6892
7452
  children: [
6893
- /* @__PURE__ */ jsx41(
7453
+ /* @__PURE__ */ jsx45(
6894
7454
  "span",
6895
7455
  {
6896
7456
  ref: onIndicatorRef,
@@ -6906,17 +7466,25 @@ var NavigationGroup = forwardRef30(
6906
7466
  }
6907
7467
  );
6908
7468
  NavigationGroup.displayName = "NavigationGroup";
6909
- var NavigationItemGroup = forwardRef30(({ className, expanded, children, ...props }, ref) => {
7469
+ var NavigationItemGroup = forwardRef34(({ className, expanded, children, ...props }, ref) => {
6910
7470
  const isCollapsible = expanded !== void 0;
6911
- return /* @__PURE__ */ jsx41(
7471
+ const isCollapsed = isCollapsible && !expanded;
7472
+ const innerRef = useRef10(null);
7473
+ useLayoutEffect5(() => {
7474
+ const inner = innerRef.current;
7475
+ if (!inner) return;
7476
+ if (isCollapsed) inner.setAttribute("inert", "");
7477
+ else inner.removeAttribute("inert");
7478
+ }, [isCollapsed]);
7479
+ return /* @__PURE__ */ jsx45(
6912
7480
  "div",
6913
7481
  {
6914
7482
  ref,
6915
7483
  className: cn("aviala-navigation-item-group", className),
6916
7484
  "data-expanded": isCollapsible ? expanded ? "true" : "false" : void 0,
6917
- "aria-hidden": isCollapsible && !expanded ? true : void 0,
7485
+ "aria-hidden": isCollapsed ? true : void 0,
6918
7486
  ...props,
6919
- children: isCollapsible ? /* @__PURE__ */ jsx41("div", { className: "aviala-navigation-item-group__inner", children }) : children
7487
+ children: isCollapsible ? /* @__PURE__ */ jsx45("div", { ref: innerRef, className: "aviala-navigation-item-group__inner", children }) : children
6920
7488
  }
6921
7489
  );
6922
7490
  });
@@ -6927,9 +7495,9 @@ function renderItemIcon3(node) {
6927
7495
  level: "text",
6928
7496
  biggerSize: true
6929
7497
  });
6930
- return /* @__PURE__ */ jsx41("span", { className: "aviala-navigation-item__icon", children: content });
7498
+ return /* @__PURE__ */ jsx45("span", { className: "aviala-navigation-item__icon", children: content });
6931
7499
  }
6932
- var NavigationItem = forwardRef30(
7500
+ var NavigationItem = forwardRef34(
6933
7501
  ({
6934
7502
  className,
6935
7503
  active,
@@ -6944,9 +7512,9 @@ var NavigationItem = forwardRef30(
6944
7512
  const Comp = asChild ? Slot5 : "a";
6945
7513
  const isActive = active ?? ariaCurrent === "page";
6946
7514
  const mode = navigationItemButtonMode(isActive);
6947
- const controlContent = /* @__PURE__ */ jsxs32(Fragment4, { children: [
7515
+ const controlContent = /* @__PURE__ */ jsxs35(Fragment5, { children: [
6948
7516
  renderItemIcon3(leftIcon),
6949
- /* @__PURE__ */ jsx41(
7517
+ /* @__PURE__ */ jsx45(
6950
7518
  Typography,
6951
7519
  {
6952
7520
  level: "text",
@@ -6955,15 +7523,15 @@ var NavigationItem = forwardRef30(
6955
7523
  children
6956
7524
  }
6957
7525
  ),
6958
- rightIcon ? /* @__PURE__ */ jsx41("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
7526
+ rightIcon ? /* @__PURE__ */ jsx45("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
6959
7527
  ] });
6960
- return /* @__PURE__ */ jsx41(
7528
+ return /* @__PURE__ */ jsx45(
6961
7529
  "span",
6962
7530
  {
6963
7531
  className: cn("aviala-navigation-item", className),
6964
7532
  "data-item-type": itemType,
6965
7533
  "data-active": isActive ? "true" : "false",
6966
- children: /* @__PURE__ */ jsx41(
7534
+ children: /* @__PURE__ */ jsx45(
6967
7535
  Comp,
6968
7536
  {
6969
7537
  ref,
@@ -6982,7 +7550,7 @@ var NavigationItem = forwardRef30(
6982
7550
  }
6983
7551
  );
6984
7552
  NavigationItem.displayName = "NavigationItem";
6985
- var NavigationActions = forwardRef30(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx41(
7553
+ var NavigationActions = forwardRef34(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx45(
6986
7554
  "div",
6987
7555
  {
6988
7556
  ref,
@@ -6992,7 +7560,7 @@ var NavigationActions = forwardRef30(({ className, children, ...props }, ref) =>
6992
7560
  }
6993
7561
  ));
6994
7562
  NavigationActions.displayName = "NavigationActions";
6995
- var NavigationActionsSlot = forwardRef30(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
7563
+ var NavigationActionsSlot = forwardRef34(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
6996
7564
  "div",
6997
7565
  {
6998
7566
  ref,
@@ -7001,12 +7569,1249 @@ var NavigationActionsSlot = forwardRef30(({ className, ...props }, ref) => /* @_
7001
7569
  }
7002
7570
  ));
7003
7571
  NavigationActionsSlot.displayName = "NavigationActionsSlot";
7572
+
7573
+ // src/components/slider.tsx
7574
+ import * as SliderPrimitive from "@radix-ui/react-slider";
7575
+ import { cva as cva13 } from "class-variance-authority";
7576
+ import { forwardRef as forwardRef35 } from "react";
7577
+ import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
7578
+ var sliderVariants = cva13("aviala-slider", {
7579
+ variants: {
7580
+ size: {
7581
+ default: "aviala-slider--size-default",
7582
+ big: "aviala-slider--size-big"
7583
+ },
7584
+ type: {
7585
+ default: "aviala-slider--type-default",
7586
+ range: "aviala-slider--type-range"
7587
+ }
7588
+ },
7589
+ defaultVariants: {
7590
+ size: "default",
7591
+ type: "default"
7592
+ }
7593
+ });
7594
+ var Slider = forwardRef35(
7595
+ ({
7596
+ className,
7597
+ size = "default",
7598
+ type = "default",
7599
+ disabled,
7600
+ value,
7601
+ defaultValue,
7602
+ min = 0,
7603
+ max = 100,
7604
+ ...props
7605
+ }, ref) => {
7606
+ const resolvedType = type ?? "default";
7607
+ const resolvedSize = size ?? "default";
7608
+ const isRange = resolvedType === "range";
7609
+ const resolvedDefaultValue = defaultValue ?? (isRange ? [25, 75] : [50]);
7610
+ const thumbCount = isRange ? Math.max(2, value?.length ?? defaultValue?.length ?? 2) : 1;
7611
+ return /* @__PURE__ */ jsxs36(
7612
+ SliderPrimitive.Root,
7613
+ {
7614
+ ref,
7615
+ className: cn(
7616
+ sliderVariants({ size: resolvedSize, type: resolvedType }),
7617
+ className
7618
+ ),
7619
+ disabled,
7620
+ value,
7621
+ defaultValue: value == null ? resolvedDefaultValue : void 0,
7622
+ min,
7623
+ max,
7624
+ "data-size": resolvedSize,
7625
+ "data-type": resolvedType,
7626
+ "data-disabled": disabled ? "true" : void 0,
7627
+ ...props,
7628
+ children: [
7629
+ /* @__PURE__ */ jsx46(SliderPrimitive.Track, { className: "aviala-slider__track", children: /* @__PURE__ */ jsx46(SliderPrimitive.Range, { className: "aviala-slider__range" }) }),
7630
+ Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ jsx46(SliderPrimitive.Thumb, { className: "aviala-slider__thumb aviala-focus-ring" }, index))
7631
+ ]
7632
+ }
7633
+ );
7634
+ }
7635
+ );
7636
+ Slider.displayName = "Slider";
7637
+
7638
+ // src/components/upload.tsx
7639
+ import { GeneralUpload } from "@aviala-design/icons";
7640
+ import { cva as cva14 } from "class-variance-authority";
7641
+ import {
7642
+ forwardRef as forwardRef36,
7643
+ useRef as useRef11,
7644
+ useState as useState14
7645
+ } from "react";
7646
+ import { jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
7647
+ var uploadVariants = cva14("aviala-upload aviala-focus-ring", {
7648
+ variants: {
7649
+ style: {
7650
+ default: "aviala-upload--style-default",
7651
+ large: "aviala-upload--style-large"
7652
+ }
7653
+ },
7654
+ defaultVariants: {
7655
+ style: "default"
7656
+ }
7657
+ });
7658
+ var Upload = forwardRef36(
7659
+ ({
7660
+ className,
7661
+ style = "default",
7662
+ title = "Drag the file here to upload the file",
7663
+ description = "Or click here to upload",
7664
+ label = "Upload",
7665
+ accept,
7666
+ multiple,
7667
+ disabled,
7668
+ dragAndDrop,
7669
+ onChange,
7670
+ inputProps,
7671
+ onDragOver,
7672
+ onDragLeave,
7673
+ onDrop,
7674
+ ...props
7675
+ }, ref) => {
7676
+ const inputRef = useRef11(null);
7677
+ const [dragging, setDragging] = useState14(false);
7678
+ const resolvedStyle = style ?? "default";
7679
+ const allowDrag = dragAndDrop ?? resolvedStyle === "large";
7680
+ const openPicker = () => {
7681
+ if (disabled) return;
7682
+ inputRef.current?.click();
7683
+ };
7684
+ const handleChange = (event) => {
7685
+ onChange?.(event.target.files);
7686
+ };
7687
+ const handleDrop = (event) => {
7688
+ onDrop?.(event);
7689
+ setDragging(false);
7690
+ if (disabled || !allowDrag) return;
7691
+ event.preventDefault();
7692
+ if (event.dataTransfer.files?.length) {
7693
+ onChange?.(event.dataTransfer.files);
7694
+ }
7695
+ };
7696
+ return /* @__PURE__ */ jsxs37(
7697
+ "div",
7698
+ {
7699
+ ref,
7700
+ role: "button",
7701
+ tabIndex: disabled ? -1 : 0,
7702
+ className: cn(uploadVariants({ style: resolvedStyle }), className),
7703
+ "data-style": resolvedStyle,
7704
+ "data-disabled": disabled ? "true" : void 0,
7705
+ "data-dragging": dragging ? "true" : void 0,
7706
+ "aria-disabled": disabled || void 0,
7707
+ onClick: openPicker,
7708
+ onKeyDown: (event) => {
7709
+ if (event.key === "Enter" || event.key === " ") {
7710
+ event.preventDefault();
7711
+ openPicker();
7712
+ }
7713
+ },
7714
+ onDragOver: (event) => {
7715
+ onDragOver?.(event);
7716
+ if (disabled || !allowDrag) return;
7717
+ event.preventDefault();
7718
+ setDragging(true);
7719
+ },
7720
+ onDragLeave: (event) => {
7721
+ onDragLeave?.(event);
7722
+ setDragging(false);
7723
+ },
7724
+ onDrop: handleDrop,
7725
+ ...props,
7726
+ children: [
7727
+ /* @__PURE__ */ jsx47(
7728
+ "input",
7729
+ {
7730
+ ref: inputRef,
7731
+ type: "file",
7732
+ className: "aviala-upload__input",
7733
+ accept,
7734
+ multiple,
7735
+ disabled,
7736
+ onChange: handleChange,
7737
+ tabIndex: -1,
7738
+ "aria-hidden": true,
7739
+ ...inputProps
7740
+ }
7741
+ ),
7742
+ /* @__PURE__ */ jsx47("span", { className: "aviala-upload__icon", "aria-hidden": true, children: /* @__PURE__ */ jsx47(GeneralUpload, { width: 16, height: 16 }) }),
7743
+ resolvedStyle === "large" ? /* @__PURE__ */ jsx47(
7744
+ Typeface,
7745
+ {
7746
+ className: "aviala-upload__typeface",
7747
+ content: "textCaption",
7748
+ primary: title,
7749
+ secondary: description
7750
+ }
7751
+ ) : /* @__PURE__ */ jsx47(Typography, { level: "text", as: "span", className: "aviala-upload__label", children: label })
7752
+ ]
7753
+ }
7754
+ );
7755
+ }
7756
+ );
7757
+ Upload.displayName = "Upload";
7758
+
7759
+ // src/components/scroll-picker.tsx
7760
+ import {
7761
+ useCallback as useCallback15,
7762
+ useEffect as useEffect9,
7763
+ useId as useId3,
7764
+ useLayoutEffect as useLayoutEffect6,
7765
+ useMemo as useMemo8,
7766
+ useRef as useRef12
7767
+ } from "react";
7768
+ import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
7769
+ var LOOP_SECTIONS2 = 3;
7770
+ var MIDDLE_SECTION2 = 1;
7771
+ var SCROLL_END_DEBOUNCE_MS2 = 80;
7772
+ function normalizeIndex2(index, length) {
7773
+ return (index % length + length) % length;
7774
+ }
7775
+ function readItemHeight2(container) {
7776
+ const item = container.querySelector(".aviala-scroll-picker-item");
7777
+ if (item) {
7778
+ return item.getBoundingClientRect().height;
7779
+ }
7780
+ const style = getComputedStyle(container);
7781
+ const token = style.getPropertyValue("--scroll-picker-item-height").trim();
7782
+ const parsed = parseFloat(token);
7783
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : 26;
7784
+ }
7785
+ function ScrollPicker({ className, children, ...props }) {
7786
+ return /* @__PURE__ */ jsx48("div", { className: cn("aviala-scroll-picker", className), ...props, children });
7787
+ }
7788
+ function ScrollPickerColumn({
7789
+ className,
7790
+ values,
7791
+ value,
7792
+ onChange,
7793
+ "aria-label": ariaLabel,
7794
+ loop = true,
7795
+ formatValue,
7796
+ getValueKey
7797
+ }) {
7798
+ const scrollRef = useRef12(null);
7799
+ const isUserScrollingRef = useRef12(false);
7800
+ const isProgrammaticScrollRef = useRef12(false);
7801
+ const scrollEndTimerRef = useRef12(void 0);
7802
+ const selectedValueRef = useRef12(value);
7803
+ const reactId = useId3();
7804
+ selectedValueRef.current = value;
7805
+ const getIndex = useCallback15(
7806
+ (candidate) => {
7807
+ const index = values.findIndex((item) => Object.is(item, candidate));
7808
+ return index >= 0 ? index : 0;
7809
+ },
7810
+ [values]
7811
+ );
7812
+ const repeatedValues = useMemo8(() => {
7813
+ if (!loop) return [...values];
7814
+ return Array.from({ length: LOOP_SECTIONS2 }, () => values).flat();
7815
+ }, [loop, values]);
7816
+ const scrollToIndex = useCallback15((index, behavior = "auto") => {
7817
+ const container = scrollRef.current;
7818
+ if (!container) return;
7819
+ const itemHeight = readItemHeight2(container);
7820
+ isProgrammaticScrollRef.current = true;
7821
+ container.scrollTo({ top: index * itemHeight, behavior });
7822
+ }, []);
7823
+ const scrollToValue = useCallback15(
7824
+ (nextValue, behavior = "smooth") => {
7825
+ const valueIndex = getIndex(nextValue);
7826
+ const targetIndex = loop ? values.length * MIDDLE_SECTION2 + valueIndex : valueIndex;
7827
+ scrollToIndex(targetIndex, behavior);
7828
+ },
7829
+ [getIndex, loop, scrollToIndex, values.length]
7830
+ );
7831
+ const settleScroll = useCallback15(() => {
7832
+ const container = scrollRef.current;
7833
+ if (!container || isProgrammaticScrollRef.current) {
7834
+ isProgrammaticScrollRef.current = false;
7835
+ return;
7836
+ }
7837
+ const itemHeight = readItemHeight2(container);
7838
+ if (itemHeight <= 0 || values.length === 0) return;
7839
+ const rawIndex = Math.round(container.scrollTop / itemHeight);
7840
+ const valueIndex = loop ? normalizeIndex2(rawIndex, values.length) : Math.min(Math.max(rawIndex, 0), values.length - 1);
7841
+ const nextValue = values[valueIndex];
7842
+ if (loop) {
7843
+ const section = Math.floor(rawIndex / values.length);
7844
+ if (section !== MIDDLE_SECTION2) {
7845
+ isProgrammaticScrollRef.current = true;
7846
+ container.scrollTop = (values.length * MIDDLE_SECTION2 + valueIndex) * itemHeight;
7847
+ }
7848
+ } else if (rawIndex !== valueIndex) {
7849
+ isProgrammaticScrollRef.current = true;
7850
+ container.scrollTop = valueIndex * itemHeight;
7851
+ }
7852
+ if (!Object.is(nextValue, selectedValueRef.current)) {
7853
+ onChange(nextValue);
7854
+ }
7855
+ isUserScrollingRef.current = false;
7856
+ }, [loop, onChange, values]);
7857
+ const handleScroll = useCallback15(() => {
7858
+ if (isProgrammaticScrollRef.current) return;
7859
+ isUserScrollingRef.current = true;
7860
+ if (scrollEndTimerRef.current) {
7861
+ clearTimeout(scrollEndTimerRef.current);
7862
+ }
7863
+ scrollEndTimerRef.current = setTimeout(settleScroll, SCROLL_END_DEBOUNCE_MS2);
7864
+ }, [settleScroll]);
7865
+ useLayoutEffect6(() => {
7866
+ if (isUserScrollingRef.current) return;
7867
+ const container = scrollRef.current;
7868
+ if (!container || values.length === 0) return;
7869
+ const itemHeight = readItemHeight2(container);
7870
+ if (itemHeight <= 0) return;
7871
+ const valueIndex = getIndex(value);
7872
+ const targetIndex = loop ? values.length * MIDDLE_SECTION2 + valueIndex : valueIndex;
7873
+ const currentIndex = Math.round(container.scrollTop / itemHeight);
7874
+ const currentValueIndex = loop ? normalizeIndex2(currentIndex, values.length) : Math.min(Math.max(currentIndex, 0), values.length - 1);
7875
+ const inMiddleSection = !loop || Math.floor(currentIndex / values.length) === MIDDLE_SECTION2;
7876
+ if (currentValueIndex === valueIndex && inMiddleSection) return;
7877
+ scrollToIndex(targetIndex, "auto");
7878
+ }, [getIndex, loop, scrollToIndex, value, values.length]);
7879
+ useEffect9(() => {
7880
+ const container = scrollRef.current;
7881
+ if (!container) return;
7882
+ const onScrollEnd = () => {
7883
+ if (scrollEndTimerRef.current) {
7884
+ clearTimeout(scrollEndTimerRef.current);
7885
+ }
7886
+ settleScroll();
7887
+ };
7888
+ container.addEventListener("scrollend", onScrollEnd);
7889
+ return () => {
7890
+ container.removeEventListener("scrollend", onScrollEnd);
7891
+ if (scrollEndTimerRef.current) {
7892
+ clearTimeout(scrollEndTimerRef.current);
7893
+ }
7894
+ };
7895
+ }, [settleScroll]);
7896
+ const handleKeyDown = (event) => {
7897
+ const currentIndex = getIndex(selectedValueRef.current);
7898
+ let nextIndex = null;
7899
+ switch (event.key) {
7900
+ case "ArrowUp":
7901
+ nextIndex = loop ? normalizeIndex2(currentIndex - 1, values.length) : Math.max(currentIndex - 1, 0);
7902
+ break;
7903
+ case "ArrowDown":
7904
+ nextIndex = loop ? normalizeIndex2(currentIndex + 1, values.length) : Math.min(currentIndex + 1, values.length - 1);
7905
+ break;
7906
+ case "Home":
7907
+ nextIndex = 0;
7908
+ break;
7909
+ case "End":
7910
+ nextIndex = values.length - 1;
7911
+ break;
7912
+ default:
7913
+ return;
7914
+ }
7915
+ event.preventDefault();
7916
+ const nextValue = values[nextIndex];
7917
+ scrollToValue(nextValue, "smooth");
7918
+ if (!Object.is(nextValue, selectedValueRef.current)) {
7919
+ onChange(nextValue);
7920
+ }
7921
+ };
7922
+ const selectedOptionId = `${reactId}-${getIndex(value)}`;
7923
+ return /* @__PURE__ */ jsx48("div", { className: cn("aviala-scroll-picker-column", className), children: /* @__PURE__ */ jsxs38("div", { className: "aviala-scroll-picker-column__viewport", children: [
7924
+ /* @__PURE__ */ jsx48("div", { className: "aviala-scroll-picker-column__highlight", "aria-hidden": true }),
7925
+ /* @__PURE__ */ jsx48(
7926
+ "div",
7927
+ {
7928
+ ref: scrollRef,
7929
+ className: "aviala-scroll-picker-column__scroll",
7930
+ onScroll: handleScroll,
7931
+ role: "listbox",
7932
+ "aria-label": ariaLabel,
7933
+ "aria-activedescendant": selectedOptionId,
7934
+ tabIndex: 0,
7935
+ onKeyDown: handleKeyDown,
7936
+ children: /* @__PURE__ */ jsx48("ul", { className: "aviala-scroll-picker-column__list", children: repeatedValues.map((itemValue, index) => {
7937
+ const isSelected = Object.is(itemValue, value);
7938
+ const valueIndex = loop ? normalizeIndex2(index, values.length) : index;
7939
+ const optionId = `${reactId}-${loop ? index : valueIndex}`;
7940
+ const key = getValueKey?.(itemValue, index) ?? `${String(itemValue)}-${index}`;
7941
+ return /* @__PURE__ */ jsx48("li", { className: "contents", children: /* @__PURE__ */ jsx48(
7942
+ ScrollPickerItem,
7943
+ {
7944
+ id: isSelected ? selectedOptionId : optionId,
7945
+ selected: isSelected,
7946
+ onSelect: () => {
7947
+ scrollToValue(itemValue, "smooth");
7948
+ if (!Object.is(itemValue, selectedValueRef.current)) {
7949
+ onChange(itemValue);
7950
+ }
7951
+ },
7952
+ children: formatValue ? formatValue(itemValue) : String(itemValue)
7953
+ }
7954
+ ) }, key);
7955
+ }) })
7956
+ }
7957
+ )
7958
+ ] }) });
7959
+ }
7960
+ function ScrollPickerItem({
7961
+ id,
7962
+ selected = false,
7963
+ children,
7964
+ className,
7965
+ onSelect
7966
+ }) {
7967
+ return /* @__PURE__ */ jsx48(
7968
+ "button",
7969
+ {
7970
+ type: "button",
7971
+ id,
7972
+ role: "option",
7973
+ "aria-selected": selected,
7974
+ className: cn(
7975
+ "aviala-scroll-picker-item",
7976
+ typographyVariants({ level: "text" }),
7977
+ className
7978
+ ),
7979
+ "data-selected": selected ? "true" : void 0,
7980
+ tabIndex: -1,
7981
+ onClick: onSelect,
7982
+ children
7983
+ }
7984
+ );
7985
+ }
7986
+
7987
+ // src/components/breadcrumb.tsx
7988
+ import { DirectionArrowRightLight as DirectionArrowRightLight3, SymbolMore } from "@aviala-design/icons";
7989
+ import { cva as cva15 } from "class-variance-authority";
7990
+ import {
7991
+ createContext as createContext9,
7992
+ forwardRef as forwardRef37,
7993
+ useCallback as useCallback16,
7994
+ useContext as useContext9,
7995
+ useState as useState15
7996
+ } from "react";
7997
+ import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
7998
+ var BreadcrumbSizeContext = createContext9("default");
7999
+ function breadcrumbTypeLevel(size) {
8000
+ return size === "small" ? "caption" : "text";
8001
+ }
8002
+ var breadcrumbVariants = cva15("aviala-breadcrumb", {
8003
+ variants: {
8004
+ size: {
8005
+ default: "aviala-breadcrumb--size-default",
8006
+ small: "aviala-breadcrumb--size-small"
8007
+ }
8008
+ },
8009
+ defaultVariants: {
8010
+ size: "default"
8011
+ }
8012
+ });
8013
+ var Breadcrumb = forwardRef37(
8014
+ ({ className, size = "default", children, ...props }, ref) => {
8015
+ const resolvedSize = size ?? "default";
8016
+ return /* @__PURE__ */ jsx49(BreadcrumbSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ jsx49(
8017
+ "nav",
8018
+ {
8019
+ ref,
8020
+ "aria-label": props["aria-label"] ?? "Breadcrumb",
8021
+ className: cn(breadcrumbVariants({ size: resolvedSize }), className),
8022
+ "data-size": resolvedSize,
8023
+ ...props,
8024
+ children: /* @__PURE__ */ jsx49("ol", { className: "aviala-breadcrumb__list", children })
8025
+ }
8026
+ ) });
8027
+ }
8028
+ );
8029
+ Breadcrumb.displayName = "Breadcrumb";
8030
+ var BreadcrumbItem = forwardRef37(
8031
+ ({ className, href, current = false, icon, onClick, children, ...props }, ref) => {
8032
+ const size = useContext9(BreadcrumbSizeContext);
8033
+ const label = /* @__PURE__ */ jsxs39(Fragment6, { children: [
8034
+ icon ? /* @__PURE__ */ jsx49("span", { className: "aviala-breadcrumb-item__icon", children: icon }) : null,
8035
+ children != null ? /* @__PURE__ */ jsx49(
8036
+ Typography,
8037
+ {
8038
+ level: breadcrumbTypeLevel(size),
8039
+ as: "span",
8040
+ className: "aviala-breadcrumb-item__label",
8041
+ children
8042
+ }
8043
+ ) : null
8044
+ ] });
8045
+ return /* @__PURE__ */ jsx49(
8046
+ "li",
8047
+ {
8048
+ ref,
8049
+ className: cn("aviala-breadcrumb-item-wrap", className),
8050
+ ...props,
8051
+ children: href != null ? /* @__PURE__ */ jsx49(
8052
+ "a",
8053
+ {
8054
+ href,
8055
+ className: "aviala-breadcrumb-item aviala-focus-ring",
8056
+ "data-current": current ? "true" : void 0,
8057
+ "aria-current": current ? "page" : void 0,
8058
+ children: label
8059
+ }
8060
+ ) : onClick != null ? /* @__PURE__ */ jsx49(
8061
+ "button",
8062
+ {
8063
+ type: "button",
8064
+ className: "aviala-breadcrumb-item aviala-focus-ring",
8065
+ "data-current": current ? "true" : void 0,
8066
+ "aria-current": current ? "page" : void 0,
8067
+ onClick,
8068
+ children: label
8069
+ }
8070
+ ) : /* @__PURE__ */ jsx49(
8071
+ "span",
8072
+ {
8073
+ className: "aviala-breadcrumb-item",
8074
+ "data-current": current ? "true" : void 0,
8075
+ "aria-current": current ? "page" : void 0,
8076
+ children: label
8077
+ }
8078
+ )
8079
+ }
8080
+ );
8081
+ }
8082
+ );
8083
+ BreadcrumbItem.displayName = "BreadcrumbItem";
8084
+ var BreadcrumbSeparator = forwardRef37(
8085
+ ({ className, children = "/", ...props }, ref) => {
8086
+ const size = useContext9(BreadcrumbSizeContext);
8087
+ return /* @__PURE__ */ jsx49(
8088
+ "li",
8089
+ {
8090
+ ref,
8091
+ role: "presentation",
8092
+ "aria-hidden": true,
8093
+ className: cn("aviala-breadcrumb-separator", className),
8094
+ ...props,
8095
+ children: /* @__PURE__ */ jsx49(Typography, { level: breadcrumbTypeLevel(size), as: "span", children })
8096
+ }
8097
+ );
8098
+ }
8099
+ );
8100
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
8101
+ var BreadcrumbEllipsisItem = forwardRef37(
8102
+ ({
8103
+ className,
8104
+ href,
8105
+ onClick,
8106
+ showChevron = true,
8107
+ children,
8108
+ ...props
8109
+ }, ref) => {
8110
+ const content = /* @__PURE__ */ jsxs39(Fragment6, { children: [
8111
+ /* @__PURE__ */ jsx49(Typography, { level: "text", as: "span", className: "aviala-breadcrumb-ellipsis-item__label", children }),
8112
+ showChevron ? /* @__PURE__ */ jsx49("span", { className: "aviala-breadcrumb-ellipsis-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx49(DirectionArrowRightLight3, { width: 14, height: 14, thickness: "Light" }) }) : null
8113
+ ] });
8114
+ if (href != null) {
8115
+ return /* @__PURE__ */ jsx49(
8116
+ "a",
8117
+ {
8118
+ ref,
8119
+ href,
8120
+ className: cn("aviala-breadcrumb-ellipsis-item aviala-focus-ring", className),
8121
+ onClick,
8122
+ ...props,
8123
+ children: content
8124
+ }
8125
+ );
8126
+ }
8127
+ return /* @__PURE__ */ jsx49(
8128
+ "button",
8129
+ {
8130
+ ref,
8131
+ type: "button",
8132
+ className: cn("aviala-breadcrumb-ellipsis-item aviala-focus-ring", className),
8133
+ onClick,
8134
+ ...props,
8135
+ children: content
8136
+ }
8137
+ );
8138
+ }
8139
+ );
8140
+ BreadcrumbEllipsisItem.displayName = "BreadcrumbEllipsisItem";
8141
+ var BreadcrumbEllipsis = forwardRef37(
8142
+ ({
8143
+ className,
8144
+ children,
8145
+ activated: activatedProp,
8146
+ defaultActivated = false,
8147
+ onActivatedChange,
8148
+ menu,
8149
+ onClick,
8150
+ "aria-label": ariaLabel,
8151
+ ...props
8152
+ }, ref) => {
8153
+ const size = useContext9(BreadcrumbSizeContext);
8154
+ const [uncontrolledActivated, setUncontrolledActivated] = useState15(defaultActivated);
8155
+ const isControlled = activatedProp !== void 0;
8156
+ const activated = isControlled ? Boolean(activatedProp) : uncontrolledActivated;
8157
+ const setActivated = useCallback16(
8158
+ (next) => {
8159
+ if (!isControlled) setUncontrolledActivated(next);
8160
+ onActivatedChange?.(next);
8161
+ },
8162
+ [isControlled, onActivatedChange]
8163
+ );
8164
+ const iconSize = 14;
8165
+ const icon = children ?? /* @__PURE__ */ jsx49(SymbolMore, { width: iconSize, height: iconSize, thickness: "Light", "aria-hidden": true });
8166
+ const trigger = /* @__PURE__ */ jsx49(
8167
+ "button",
8168
+ {
8169
+ type: "button",
8170
+ className: "aviala-breadcrumb-ellipsis aviala-focus-ring",
8171
+ "data-size": size,
8172
+ "data-activated": activated ? "true" : void 0,
8173
+ "aria-label": ariaLabel ?? "Show more breadcrumb items",
8174
+ "aria-expanded": menu != null ? activated : void 0,
8175
+ "aria-haspopup": menu != null ? "menu" : void 0,
8176
+ onClick: (event) => {
8177
+ onClick?.(event);
8178
+ if (event.defaultPrevented) return;
8179
+ if (menu == null) setActivated(!activated);
8180
+ },
8181
+ ...props,
8182
+ children: icon
8183
+ }
8184
+ );
8185
+ return /* @__PURE__ */ jsx49("li", { ref, className: cn("aviala-breadcrumb-ellipsis-wrap", className), children: menu != null ? /* @__PURE__ */ jsxs39(Popover, { open: activated, onOpenChange: setActivated, children: [
8186
+ /* @__PURE__ */ jsx49(PopoverTrigger, { asChild: true, children: trigger }),
8187
+ /* @__PURE__ */ jsx49(
8188
+ PopoverContent,
8189
+ {
8190
+ className: "aviala-breadcrumb-ellipsis-menu",
8191
+ align: "center",
8192
+ side: "bottom",
8193
+ sideOffset: 7,
8194
+ showArrow: false,
8195
+ role: "menu",
8196
+ children: /* @__PURE__ */ jsx49("div", { className: "aviala-breadcrumb-ellipsis-menu__items", children: menu })
8197
+ }
8198
+ )
8199
+ ] }) : trigger });
8200
+ }
8201
+ );
8202
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
8203
+
8204
+ // src/components/pagehead.tsx
8205
+ import {
8206
+ forwardRef as forwardRef38
8207
+ } from "react";
8208
+ import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
8209
+ var Pagehead = forwardRef38(
8210
+ ({
8211
+ className,
8212
+ back,
8213
+ breadcrumb,
8214
+ title,
8215
+ description,
8216
+ actions,
8217
+ children,
8218
+ ...props
8219
+ }, ref) => /* @__PURE__ */ jsxs40("header", { ref, className: cn("aviala-pagehead", className), ...props, children: [
8220
+ /* @__PURE__ */ jsxs40("div", { className: "aviala-pagehead__main", children: [
8221
+ back != null ? /* @__PURE__ */ jsx50("div", { className: "aviala-pagehead__back", children: back }) : null,
8222
+ /* @__PURE__ */ jsxs40("div", { className: "aviala-pagehead__title-block", children: [
8223
+ breadcrumb != null ? /* @__PURE__ */ jsx50("div", { className: "aviala-pagehead__breadcrumb", children: breadcrumb }) : null,
8224
+ title != null || description != null ? /* @__PURE__ */ jsx50("div", { className: "aviala-pagehead__title", children: /* @__PURE__ */ jsx50(Typeface, { content: "textCaption", primary: title, secondary: description }) }) : null,
8225
+ children
8226
+ ] })
8227
+ ] }),
8228
+ actions != null ? /* @__PURE__ */ jsx50("div", { className: "aviala-pagehead__actions", children: actions }) : null
8229
+ ] })
8230
+ );
8231
+ Pagehead.displayName = "Pagehead";
8232
+
8233
+ // src/components/steps.tsx
8234
+ import {
8235
+ SymbolRight as SymbolRight4,
8236
+ SymbolWarning,
8237
+ SymbolWrong as SymbolWrong5
8238
+ } from "@aviala-design/icons";
8239
+ import { cva as cva16 } from "class-variance-authority";
8240
+ import {
8241
+ forwardRef as forwardRef39
8242
+ } from "react";
8243
+ import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
8244
+ var stepsVariants = cva16("aviala-steps", {
8245
+ variants: {
8246
+ direction: {
8247
+ horizontal: "aviala-steps--direction-horizontal",
8248
+ vertical: "aviala-steps--direction-vertical"
8249
+ }
8250
+ },
8251
+ defaultVariants: {
8252
+ direction: "horizontal"
8253
+ }
8254
+ });
8255
+ var Steps = forwardRef39(
8256
+ ({ className, direction = "horizontal", children, ...props }, ref) => /* @__PURE__ */ jsx51(
8257
+ "div",
8258
+ {
8259
+ ref,
8260
+ className: cn(stepsVariants({ direction }), className),
8261
+ "data-direction": direction,
8262
+ ...props,
8263
+ children
8264
+ }
8265
+ )
8266
+ );
8267
+ Steps.displayName = "Steps";
8268
+ function defaultStepsIconContent(state, index) {
8269
+ switch (state) {
8270
+ case "done":
8271
+ return /* @__PURE__ */ jsx51(SymbolRight4, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
8272
+ case "fail":
8273
+ return /* @__PURE__ */ jsx51(SymbolWrong5, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
8274
+ case "warning":
8275
+ return /* @__PURE__ */ jsx51(SymbolWarning, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
8276
+ case "waiting":
8277
+ case "inProgress":
8278
+ case "default":
8279
+ default:
8280
+ return index != null ? /* @__PURE__ */ jsx51(Typography, { level: "caption", as: "span", className: "aviala-steps-icon__index", children: index }) : null;
8281
+ }
8282
+ }
8283
+ var StepsIcon = forwardRef39(
8284
+ ({ className, state = "default", index, children, ...props }, ref) => /* @__PURE__ */ jsx51(
8285
+ "span",
8286
+ {
8287
+ ref,
8288
+ className: cn("aviala-steps-icon", className),
8289
+ "data-state": state,
8290
+ ...props,
8291
+ children: children ?? defaultStepsIconContent(state, index)
8292
+ }
8293
+ )
8294
+ );
8295
+ StepsIcon.displayName = "StepsIcon";
8296
+ var StepsItem = forwardRef39(
8297
+ ({
8298
+ className,
8299
+ state = "default",
8300
+ title,
8301
+ description,
8302
+ index,
8303
+ icon,
8304
+ children,
8305
+ ...props
8306
+ }, ref) => /* @__PURE__ */ jsxs41(
8307
+ "div",
8308
+ {
8309
+ ref,
8310
+ className: cn("aviala-steps-item", className),
8311
+ "data-state": state,
8312
+ ...props,
8313
+ children: [
8314
+ icon ?? /* @__PURE__ */ jsx51(StepsIcon, { state, index }),
8315
+ /* @__PURE__ */ jsxs41("div", { className: "aviala-steps-item__body", children: [
8316
+ title != null ? /* @__PURE__ */ jsx51(
8317
+ Typography,
8318
+ {
8319
+ level: "subtitle",
8320
+ as: "div",
8321
+ className: "aviala-steps-item__title",
8322
+ children: title
8323
+ }
8324
+ ) : null,
8325
+ description != null ? /* @__PURE__ */ jsx51(
8326
+ Typography,
8327
+ {
8328
+ level: "text",
8329
+ as: "div",
8330
+ className: "aviala-steps-item__description",
8331
+ children: description
8332
+ }
8333
+ ) : null,
8334
+ children
8335
+ ] })
8336
+ ]
8337
+ }
8338
+ )
8339
+ );
8340
+ StepsItem.displayName = "StepsItem";
8341
+
8342
+ // src/components/pagination.tsx
8343
+ import {
8344
+ DirectionArrowLeftLight,
8345
+ DirectionArrowRightLight as DirectionArrowRightLight4
8346
+ } from "@aviala-design/icons";
8347
+ import {
8348
+ forwardRef as forwardRef40,
8349
+ useState as useState16
8350
+ } from "react";
8351
+ import { jsx as jsx52, jsxs as jsxs42 } from "react/jsx-runtime";
8352
+ function buildPageList(page, pageCount) {
8353
+ if (pageCount <= 7) {
8354
+ return Array.from({ length: pageCount }, (_, index) => index + 1);
8355
+ }
8356
+ const pages = /* @__PURE__ */ new Set();
8357
+ pages.add(1);
8358
+ pages.add(pageCount);
8359
+ for (let i = page - 1; i <= page + 1; i += 1) {
8360
+ if (i >= 1 && i <= pageCount) pages.add(i);
8361
+ }
8362
+ const sorted = [...pages].sort((a, b) => a - b);
8363
+ const result = [];
8364
+ for (let i = 0; i < sorted.length; i += 1) {
8365
+ const current = sorted[i];
8366
+ const prev = sorted[i - 1];
8367
+ if (prev != null && current - prev > 1) {
8368
+ result.push("ellipsis");
8369
+ }
8370
+ result.push(current);
8371
+ }
8372
+ return result;
8373
+ }
8374
+ var Pagination = forwardRef40(
8375
+ ({
8376
+ className,
8377
+ page: pageProp,
8378
+ defaultPage = 1,
8379
+ pageCount,
8380
+ onPageChange,
8381
+ showJump = true,
8382
+ showSizeChanger = true,
8383
+ pageSize: pageSizeProp,
8384
+ defaultPageSize = 10,
8385
+ pageSizeOptions = [10, 20, 50],
8386
+ onPageSizeChange,
8387
+ jumpLabel = "\u8DF3\u8F6C\u81F3",
8388
+ sizeLabel = "\u6BCF\u9875",
8389
+ sizeOptionLabel = (size) => `${size} \u9879`,
8390
+ ...props
8391
+ }, ref) => {
8392
+ const [uncontrolledPage, setUncontrolledPage] = useState16(defaultPage);
8393
+ const [uncontrolledPageSize, setUncontrolledPageSize] = useState16(defaultPageSize);
8394
+ const [jumpValue, setJumpValue] = useState16("");
8395
+ const page = pageProp ?? uncontrolledPage;
8396
+ const pageSize = pageSizeProp ?? uncontrolledPageSize;
8397
+ const safePageCount = Math.max(1, pageCount);
8398
+ const currentPage = Math.min(Math.max(page, 1), safePageCount);
8399
+ const pages = buildPageList(currentPage, safePageCount);
8400
+ const setPage = (next) => {
8401
+ const clamped = Math.min(Math.max(next, 1), safePageCount);
8402
+ if (pageProp == null) setUncontrolledPage(clamped);
8403
+ onPageChange?.(clamped);
8404
+ };
8405
+ const setPageSize = (next) => {
8406
+ if (pageSizeProp == null) setUncontrolledPageSize(next);
8407
+ onPageSizeChange?.(next);
8408
+ };
8409
+ const commitJump = () => {
8410
+ const parsed = Number.parseInt(jumpValue, 10);
8411
+ if (!Number.isFinite(parsed)) return;
8412
+ setPage(parsed);
8413
+ setJumpValue("");
8414
+ };
8415
+ return /* @__PURE__ */ jsxs42(
8416
+ "div",
8417
+ {
8418
+ ref,
8419
+ className: cn("aviala-pagination", className),
8420
+ role: "navigation",
8421
+ "aria-label": props["aria-label"] ?? "Pagination",
8422
+ ...props,
8423
+ children: [
8424
+ /* @__PURE__ */ jsxs42("div", { className: "aviala-pagination__controls", children: [
8425
+ /* @__PURE__ */ jsx52(
8426
+ Button,
8427
+ {
8428
+ mode: "noBackgroundCustom",
8429
+ size: "regular",
8430
+ iconOnly: true,
8431
+ "aria-label": "Previous page",
8432
+ disabled: currentPage <= 1,
8433
+ leftIcon: /* @__PURE__ */ jsx52(DirectionArrowLeftLight, { "aria-hidden": true }),
8434
+ onClick: () => setPage(currentPage - 1)
8435
+ }
8436
+ ),
8437
+ /* @__PURE__ */ jsx52("div", { className: "aviala-pagination__pages", children: pages.map(
8438
+ (item, index) => item === "ellipsis" ? /* @__PURE__ */ jsx52(
8439
+ Typography,
8440
+ {
8441
+ level: "text",
8442
+ as: "span",
8443
+ className: "aviala-pagination__page",
8444
+ "aria-hidden": true,
8445
+ children: "\u2026"
8446
+ },
8447
+ `ellipsis-${index}`
8448
+ ) : /* @__PURE__ */ jsx52(
8449
+ "button",
8450
+ {
8451
+ type: "button",
8452
+ className: "aviala-pagination__page aviala-focus-ring",
8453
+ "data-active": item === currentPage ? "true" : void 0,
8454
+ "aria-current": item === currentPage ? "page" : void 0,
8455
+ onClick: () => setPage(item),
8456
+ children: /* @__PURE__ */ jsx52(Typography, { level: "text", as: "span", children: item })
8457
+ },
8458
+ item
8459
+ )
8460
+ ) }),
8461
+ /* @__PURE__ */ jsx52(
8462
+ Button,
8463
+ {
8464
+ mode: "noBackgroundCustom",
8465
+ size: "regular",
8466
+ iconOnly: true,
8467
+ "aria-label": "Next page",
8468
+ disabled: currentPage >= safePageCount,
8469
+ leftIcon: /* @__PURE__ */ jsx52(DirectionArrowRightLight4, { "aria-hidden": true }),
8470
+ onClick: () => setPage(currentPage + 1)
8471
+ }
8472
+ )
8473
+ ] }),
8474
+ showJump ? /* @__PURE__ */ jsxs42("div", { className: "aviala-pagination__jump", children: [
8475
+ /* @__PURE__ */ jsx52(Typography, { level: "text", as: "span", children: jumpLabel }),
8476
+ /* @__PURE__ */ jsx52(
8477
+ Input,
8478
+ {
8479
+ className: "aviala-pagination__jump-input",
8480
+ size: "regular",
8481
+ fullWidth: false,
8482
+ value: jumpValue,
8483
+ placeholder: "\u9875\u7801",
8484
+ inputMode: "numeric",
8485
+ onChange: (event) => setJumpValue(event.target.value),
8486
+ onKeyDown: (event) => {
8487
+ if (event.key === "Enter") {
8488
+ event.preventDefault();
8489
+ commitJump();
8490
+ }
8491
+ },
8492
+ onBlur: commitJump
8493
+ }
8494
+ )
8495
+ ] }) : null,
8496
+ showSizeChanger ? /* @__PURE__ */ jsxs42("div", { className: "aviala-pagination__size", children: [
8497
+ /* @__PURE__ */ jsx52(Typography, { level: "text", as: "span", children: sizeLabel }),
8498
+ /* @__PURE__ */ jsxs42(
8499
+ Select,
8500
+ {
8501
+ value: String(pageSize),
8502
+ onValueChange: (value) => setPageSize(Number(value)),
8503
+ children: [
8504
+ /* @__PURE__ */ jsx52(
8505
+ SelectTrigger,
8506
+ {
8507
+ size: "regular",
8508
+ className: "aviala-pagination__size-select",
8509
+ "aria-label": "Page size"
8510
+ }
8511
+ ),
8512
+ /* @__PURE__ */ jsx52(SelectContent, { children: /* @__PURE__ */ jsx52(SelectItemGroup, { children: pageSizeOptions.map((option) => /* @__PURE__ */ jsx52(SelectItem, { value: String(option), children: sizeOptionLabel(option) }, option)) }) })
8513
+ ]
8514
+ }
8515
+ )
8516
+ ] }) : null
8517
+ ]
8518
+ }
8519
+ );
8520
+ }
8521
+ );
8522
+ Pagination.displayName = "Pagination";
8523
+
8524
+ // src/components/card.tsx
8525
+ import {
8526
+ DirectionArrowRightLight as DirectionArrowRightLight5,
8527
+ GeneralSetting as GeneralSetting2
8528
+ } from "@aviala-design/icons";
8529
+ import {
8530
+ cloneElement as cloneElement13,
8531
+ forwardRef as forwardRef41,
8532
+ isValidElement as isValidElement17
8533
+ } from "react";
8534
+ import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs43 } from "react/jsx-runtime";
8535
+ var Card = forwardRef41(
8536
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx53("div", { ref, className: cn("aviala-card", className), ...props, children })
8537
+ );
8538
+ Card.displayName = "Card";
8539
+ function renderCardIcon(node) {
8540
+ if (!node) return null;
8541
+ const content = isValidElement17(node) && typeof node.type !== "string" ? cloneElement13(node, {
8542
+ width: 14,
8543
+ height: 14,
8544
+ className: cn(
8545
+ node.props.className,
8546
+ "shrink-0"
8547
+ )
8548
+ }) : node;
8549
+ return /* @__PURE__ */ jsx53("span", { className: "aviala-card-head__icon", children: content });
8550
+ }
8551
+ var CardHead = forwardRef41(
8552
+ ({
8553
+ className,
8554
+ slotType = "select",
8555
+ icon,
8556
+ title,
8557
+ description,
8558
+ actionLabel = "Text",
8559
+ action,
8560
+ secondaryAction,
8561
+ select,
8562
+ switchProps,
8563
+ trailing,
8564
+ children,
8565
+ ...props
8566
+ }, ref) => {
8567
+ const primaryAction = action ?? /* @__PURE__ */ jsx53(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx53(GeneralSetting2, { "aria-hidden": true }), children: actionLabel });
8568
+ const renderTrailing = () => {
8569
+ if (trailing !== void 0) return trailing;
8570
+ switch (slotType) {
8571
+ case "action":
8572
+ return /* @__PURE__ */ jsxs43("div", { className: "aviala-card-head__trailing", children: [
8573
+ primaryAction,
8574
+ secondaryAction ?? /* @__PURE__ */ jsx53(
8575
+ Button,
8576
+ {
8577
+ mode: "default",
8578
+ size: "regular",
8579
+ iconOnly: true,
8580
+ "aria-label": "More",
8581
+ leftIcon: /* @__PURE__ */ jsx53(GeneralSetting2, { "aria-hidden": true })
8582
+ }
8583
+ ),
8584
+ /* @__PURE__ */ jsx53("span", { className: "aviala-card__divider", "aria-hidden": true }),
8585
+ /* @__PURE__ */ jsx53(DirectionArrowRightLight5, { width: 14, height: 14, "aria-hidden": true })
8586
+ ] });
8587
+ case "switch":
8588
+ return /* @__PURE__ */ jsxs43("div", { className: "aviala-card-head__trailing", children: [
8589
+ primaryAction,
8590
+ /* @__PURE__ */ jsx53("span", { className: "aviala-card__divider", "aria-hidden": true }),
8591
+ /* @__PURE__ */ jsx53(Switch, { ...switchProps })
8592
+ ] });
8593
+ case "select":
8594
+ default:
8595
+ return select != null ? /* @__PURE__ */ jsx53("div", { className: "aviala-card-head__trailing", children: select }) : null;
8596
+ }
8597
+ };
8598
+ return /* @__PURE__ */ jsxs43(
8599
+ "div",
8600
+ {
8601
+ ref,
8602
+ className: cn("aviala-card-head", className),
8603
+ "data-type": slotType,
8604
+ ...props,
8605
+ children: [
8606
+ /* @__PURE__ */ jsxs43("div", { className: "aviala-card-head__main", children: [
8607
+ renderCardIcon(icon ?? /* @__PURE__ */ jsx53(GeneralSetting2, { "aria-hidden": true })),
8608
+ /* @__PURE__ */ jsx53("div", { className: "aviala-card-head__title", children: title != null || description != null ? /* @__PURE__ */ jsx53(Typeface, { content: "textCaption", primary: title, secondary: description }) : children })
8609
+ ] }),
8610
+ renderTrailing()
8611
+ ]
8612
+ }
8613
+ );
8614
+ }
8615
+ );
8616
+ CardHead.displayName = "CardHead";
8617
+ var CardBody = forwardRef41(
8618
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx53("div", { ref, className: cn("aviala-card-body", className), ...props, children: /* @__PURE__ */ jsx53("div", { className: "aviala-card-body__content", children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx53(Typography, { level: "text", as: "span", children }) : children }) })
8619
+ );
8620
+ CardBody.displayName = "CardBody";
8621
+ var CardBottom = forwardRef41(
8622
+ ({
8623
+ className,
8624
+ slotType = "action",
8625
+ actionLabel = "Text",
8626
+ action,
8627
+ secondaryAction,
8628
+ select,
8629
+ switchProps,
8630
+ trailing,
8631
+ children,
8632
+ ...props
8633
+ }, ref) => {
8634
+ const primaryAction = action ?? /* @__PURE__ */ jsx53(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx53(GeneralSetting2, { "aria-hidden": true }), children: actionLabel });
8635
+ const renderTrailing = () => {
8636
+ if (trailing !== void 0) return trailing;
8637
+ if (children != null) return children;
8638
+ switch (slotType) {
8639
+ case "switch":
8640
+ return /* @__PURE__ */ jsxs43(Fragment7, { children: [
8641
+ primaryAction,
8642
+ /* @__PURE__ */ jsx53("span", { className: "aviala-card__divider", "aria-hidden": true }),
8643
+ /* @__PURE__ */ jsx53(Switch, { ...switchProps })
8644
+ ] });
8645
+ case "select":
8646
+ return select;
8647
+ case "action":
8648
+ default:
8649
+ return /* @__PURE__ */ jsxs43(Fragment7, { children: [
8650
+ primaryAction,
8651
+ secondaryAction ?? /* @__PURE__ */ jsx53(
8652
+ Button,
8653
+ {
8654
+ mode: "default",
8655
+ size: "regular",
8656
+ iconOnly: true,
8657
+ "aria-label": "More",
8658
+ leftIcon: /* @__PURE__ */ jsx53(GeneralSetting2, { "aria-hidden": true })
8659
+ }
8660
+ ),
8661
+ /* @__PURE__ */ jsx53("span", { className: "aviala-card__divider", "aria-hidden": true }),
8662
+ /* @__PURE__ */ jsx53(DirectionArrowRightLight5, { width: 14, height: 14, "aria-hidden": true })
8663
+ ] });
8664
+ }
8665
+ };
8666
+ return /* @__PURE__ */ jsx53(
8667
+ "div",
8668
+ {
8669
+ ref,
8670
+ className: cn("aviala-card-bottom", className),
8671
+ "data-type": slotType,
8672
+ ...props,
8673
+ children: /* @__PURE__ */ jsx53("div", { className: "aviala-card-bottom__trailing", children: renderTrailing() })
8674
+ }
8675
+ );
8676
+ }
8677
+ );
8678
+ CardBottom.displayName = "CardBottom";
8679
+
8680
+ // src/components/table.tsx
8681
+ import {
8682
+ cloneElement as cloneElement14,
8683
+ forwardRef as forwardRef42,
8684
+ isValidElement as isValidElement18
8685
+ } from "react";
8686
+ import { Fragment as Fragment8, jsx as jsx54, jsxs as jsxs44 } from "react/jsx-runtime";
8687
+ var Table = forwardRef42(
8688
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx54(
8689
+ "div",
8690
+ {
8691
+ ref,
8692
+ role: "table",
8693
+ className: cn("aviala-table", className),
8694
+ ...props,
8695
+ children
8696
+ }
8697
+ )
8698
+ );
8699
+ Table.displayName = "Table";
8700
+ var TableRow = forwardRef42(
8701
+ ({ className, header = false, children, ...props }, ref) => /* @__PURE__ */ jsx54(
8702
+ "div",
8703
+ {
8704
+ ref,
8705
+ role: "row",
8706
+ className: cn("aviala-table__row", className),
8707
+ "data-header": header ? "true" : void 0,
8708
+ ...props,
8709
+ children
8710
+ }
8711
+ )
8712
+ );
8713
+ TableRow.displayName = "TableRow";
8714
+ var TableHead = forwardRef42(
8715
+ ({ className, content = "text", children, ...props }, ref) => /* @__PURE__ */ jsx54(
8716
+ "div",
8717
+ {
8718
+ ref,
8719
+ role: "columnheader",
8720
+ className: cn("aviala-table-head", className),
8721
+ "data-content": content,
8722
+ ...props,
8723
+ children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx54(Typography, { level: "caption", as: "span", children }) : children
8724
+ }
8725
+ )
8726
+ );
8727
+ TableHead.displayName = "TableHead";
8728
+ function renderCellIcon(node) {
8729
+ if (!node) return null;
8730
+ const content = isValidElement18(node) && typeof node.type !== "string" ? cloneElement14(node, {
8731
+ width: 16,
8732
+ height: 16,
8733
+ className: cn(
8734
+ node.props.className,
8735
+ "shrink-0"
8736
+ )
8737
+ }) : node;
8738
+ return /* @__PURE__ */ jsx54("span", { className: "aviala-table-cell__icon", children: content });
8739
+ }
8740
+ var TableCell = forwardRef42(
8741
+ ({
8742
+ className,
8743
+ content = "text",
8744
+ icon,
8745
+ text,
8746
+ people,
8747
+ badge,
8748
+ badgeLabel,
8749
+ switchProps,
8750
+ actions,
8751
+ checkboxProps,
8752
+ children,
8753
+ ...props
8754
+ }, ref) => {
8755
+ const renderContent = () => {
8756
+ if (children != null) return children;
8757
+ switch (content) {
8758
+ case "checkbox":
8759
+ return /* @__PURE__ */ jsx54(Checkbox, { ...checkboxProps });
8760
+ case "icon+text":
8761
+ return /* @__PURE__ */ jsxs44(Fragment8, { children: [
8762
+ renderCellIcon(icon),
8763
+ /* @__PURE__ */ jsx54("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx54(Typography, { level: "text", as: "span", children: text }) })
8764
+ ] });
8765
+ case "people":
8766
+ return /* @__PURE__ */ jsxs44(Fragment8, { children: [
8767
+ people ?? /* @__PURE__ */ jsx54(Avatar, { content: "text", level: "text", children: "A" }),
8768
+ /* @__PURE__ */ jsx54("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx54(Typography, { level: "text", as: "span", children: text }) })
8769
+ ] });
8770
+ case "badge":
8771
+ return badge ?? /* @__PURE__ */ jsx54(Badge, { style: "theme", level: "caption", children: badgeLabel ?? "Text" });
8772
+ case "switch":
8773
+ return /* @__PURE__ */ jsx54(Switch, { ...switchProps });
8774
+ case "action":
8775
+ return /* @__PURE__ */ jsx54("div", { className: "aviala-table-cell__actions", children: actions });
8776
+ case "text":
8777
+ default:
8778
+ return /* @__PURE__ */ jsx54("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx54(Typography, { level: "text", as: "span", children: text }) });
8779
+ }
8780
+ };
8781
+ return /* @__PURE__ */ jsx54(
8782
+ "div",
8783
+ {
8784
+ ref,
8785
+ role: "cell",
8786
+ className: cn("aviala-table-cell", className),
8787
+ "data-content": content,
8788
+ ...props,
8789
+ children: renderContent()
8790
+ }
8791
+ );
8792
+ }
8793
+ );
8794
+ TableCell.displayName = "TableCell";
8795
+
8796
+ // src/lib/keyboard-focus.ts
8797
+ function initKeyboardFocus() {
8798
+ }
7004
8799
  export {
7005
8800
  Alert,
7006
8801
  Anchor2 as Anchor,
7007
8802
  AnchorItem,
8803
+ Avatar,
7008
8804
  Badge,
8805
+ Breadcrumb,
8806
+ BreadcrumbEllipsis,
8807
+ BreadcrumbEllipsisItem,
8808
+ BreadcrumbItem,
8809
+ BreadcrumbSeparator,
7009
8810
  Button,
8811
+ Card,
8812
+ CardBody,
8813
+ CardBottom,
8814
+ CardHead,
7010
8815
  Cascader,
7011
8816
  CascaderColumn,
7012
8817
  CascaderContent,
@@ -7073,13 +8878,20 @@ export {
7073
8878
  NavigationItemGroup,
7074
8879
  NavigationSection,
7075
8880
  PALETTE_HUE_FAMILIES,
8881
+ Pagehead,
8882
+ Pagination,
7076
8883
  Popover,
7077
8884
  PopoverAnchor,
7078
8885
  PopoverContent,
7079
8886
  PopoverTrigger,
8887
+ Progress,
7080
8888
  RadioGroup,
7081
8889
  RadioGroupItem,
7082
8890
  RadioInput,
8891
+ Scroll,
8892
+ ScrollPicker,
8893
+ ScrollPickerColumn,
8894
+ ScrollPickerItem,
7083
8895
  SegmentatorGroup,
7084
8896
  SegmentatorItem,
7085
8897
  Select,
@@ -7095,9 +8907,19 @@ export {
7095
8907
  SelectSubMenu,
7096
8908
  SelectTrigger,
7097
8909
  SelectValue,
8910
+ Slider,
7098
8911
  Stack,
8912
+ Steps,
8913
+ StepsIcon,
8914
+ StepsItem,
7099
8915
  Switch,
7100
8916
  TOOLTIP_DELAY_DURATION,
8917
+ Table,
8918
+ TableCell,
8919
+ TableHead,
8920
+ TableRow,
8921
+ Tag,
8922
+ TagClose,
7101
8923
  Textarea,
7102
8924
  ThemeProvider,
7103
8925
  ThemeScript,
@@ -7114,6 +8936,7 @@ export {
7114
8936
  Typeface,
7115
8937
  TypefacePair,
7116
8938
  Typography,
8939
+ Upload,
7117
8940
  alertVariants,
7118
8941
  buttonVariants,
7119
8942
  cn,