achery-ui 0.9.2 → 0.10.2

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.d.cts CHANGED
@@ -2075,4 +2075,109 @@ interface MaterialCardProps extends HTMLAttributes<HTMLDivElement> {
2075
2075
  */
2076
2076
  declare function MaterialCard({ intensity, header, footer, children, className, ...props }: MaterialCardProps): react_jsx_runtime.JSX.Element;
2077
2077
 
2078
- export { AccentColor, type AccentDial, AcheryProvider, type AcheryProviderProps, AppBar, type AppBarProps, Avatar, type AvatarProps, type AvatarSize, type AvatarTone, Badge, type BadgeProps, type BadgeTone, Body, type BodyProps, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, type ColumnDef, Combobox, type ComboboxProps, type ComponentSize, ConfirmDialogProvider, type ConfirmOptions, DatePicker, type DatePickerProps, Display, EntityPill, type EntityPillProps, Eyebrow, type EyebrowProps, Field, type FieldProps, Glyph, GlyphAliases, GlyphCategories, type GlyphCategory, type GlyphName, GlyphPicker, type GlyphPickerProps, type GlyphProps, type GlyphSearchResult, Heading, type HeadingProps, Input, type InputProps, type InputStatus, KpiTile, type KpiTileProps, LetterStamp, type LetterStampProps, type LetterStampSize, type LetterStampTone, Marginalia, type MarginaliaProps, MaterialCard, type MaterialCardProps, type MaterialIntensity, type MaterialSignature, Menu, type MenuItemDef, type MenuProps, type MenuSeparator, Modal, type ModalProps, Mono, type MonoProps, type NavGroupDef, type NavItemDef, ProgressBar, type ProgressBarProps, SearchInput, type SearchInputProps, Select, type SelectProps, Sidebar, type SidebarLinkProps, type SidebarProps, SingleCombobox, type SingleComboboxProps, Skeleton, type SkeletonProps, type SortDirection, Sparkline, type SparklineProps, type SparklineTone, StatePill, type StatePillProps, type SubscriptionState, type TabItem, Table, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ThemeMode, type ToastData, ToastProvider, type ToastProviderProps, Toggle, type ToggleProps, Tooltip, type TooltipProps, type TransactionType, TypeTag, type TypeTagProps, glyphCategory, glyphLabel, searchGlyphs, useConfirm, useTheme, useToast, vars };
2078
+ /** Props for the {@link DetailRail} component. */
2079
+ interface DetailRailProps {
2080
+ /** Whether the rail is visible. */
2081
+ open: boolean;
2082
+ /** Called when the user clicks the close button or the backdrop. */
2083
+ onClose: () => void;
2084
+ /** Title rendered in the header. */
2085
+ title: string;
2086
+ /** Optional eyebrow label above the title. */
2087
+ eyebrow?: string;
2088
+ /** Main content area. */
2089
+ children?: ReactNode;
2090
+ /** Footer slot — typically action buttons. */
2091
+ footer?: ReactNode;
2092
+ /**
2093
+ * Width of the rail on desktop.
2094
+ * @default 360
2095
+ */
2096
+ width?: number;
2097
+ className?: string;
2098
+ }
2099
+ /**
2100
+ * A slide-in detail panel that appears from the right on desktop and slides up
2101
+ * from the bottom on mobile (≤640px). Clicking the backdrop or the close button
2102
+ * dismisses it.
2103
+ *
2104
+ * Useful for showing contextual detail alongside a list or table without
2105
+ * navigating away from the page.
2106
+ *
2107
+ * @example
2108
+ * ```tsx
2109
+ * <DetailRail open={!!selected} onClose={() => setSelected(null)} title={selected?.name} eyebrow="Transaction">
2110
+ * <Field label="Amount"><Input value={selected?.amount} /></Field>
2111
+ * </DetailRail>
2112
+ * ```
2113
+ */
2114
+ declare const DetailRail: ({ open, onClose, title, eyebrow, children, footer, width, className, }: DetailRailProps) => react_jsx_runtime.JSX.Element | null;
2115
+
2116
+ /** Props for the {@link ColourInput} component. */
2117
+ interface ColourInputProps {
2118
+ /** Current hex colour value, e.g. `'#c46a3a'`. Defaults to `'#000000'`. */
2119
+ value?: string;
2120
+ /** Called with the new hex colour when the value changes. */
2121
+ onChange?: (value: string) => void;
2122
+ /** When true, applies error border colouring. Pair with {@link Field} `error` prop. */
2123
+ error?: boolean;
2124
+ /** Placeholder shown in the text field when empty. */
2125
+ placeholder?: string;
2126
+ /** Disable the input. */
2127
+ disabled?: boolean;
2128
+ className?: string;
2129
+ style?: HTMLAttributes<HTMLDivElement>['style'];
2130
+ }
2131
+ /**
2132
+ * Hex colour picker combining a native `<input type="color">` swatch and a
2133
+ * text field for direct hex entry. Normalises 3-digit shorthand on blur.
2134
+ * Wrap in {@link Field} to add a label and hint/error text.
2135
+ *
2136
+ * @example
2137
+ * ```tsx
2138
+ * <Field label="Category colour">
2139
+ * <ColourInput value={colour} onChange={setColour} />
2140
+ * </Field>
2141
+ * ```
2142
+ */
2143
+ declare const ColourInput: ({ value, onChange, error, placeholder, disabled, className, style, }: ColourInputProps) => react_jsx_runtime.JSX.Element;
2144
+
2145
+ /** A single option within a {@link SegmentedControl}. */
2146
+ interface SegmentOption<T extends string = string> {
2147
+ value: T;
2148
+ label: ReactNode;
2149
+ }
2150
+ /** Props for the {@link SegmentedControl} component. */
2151
+ interface SegmentedControlProps<T extends string = string> {
2152
+ /** Available options. */
2153
+ options: SegmentOption<T>[];
2154
+ /** Currently selected value. */
2155
+ value: T;
2156
+ /** Called when the user selects a segment. */
2157
+ onChange: (value: T) => void;
2158
+ /**
2159
+ * Size preset.
2160
+ * @default 'md'
2161
+ */
2162
+ size?: 'sm' | 'md' | 'lg';
2163
+ /** Disable all segments. */
2164
+ disabled?: boolean;
2165
+ className?: string;
2166
+ }
2167
+ /**
2168
+ * Inline button group where exactly one option is active. Use for mutually
2169
+ * exclusive view modes or filter toggles where showing all options simultaneously
2170
+ * is worth the space.
2171
+ *
2172
+ * @example
2173
+ * ```tsx
2174
+ * <SegmentedControl
2175
+ * options={[{ value: 'week', label: 'Week' }, { value: 'month', label: 'Month' }]}
2176
+ * value={period}
2177
+ * onChange={setPeriod}
2178
+ * />
2179
+ * ```
2180
+ */
2181
+ declare const SegmentedControl: <T extends string>({ options, value, onChange, size, disabled, className, }: SegmentedControlProps<T>) => react_jsx_runtime.JSX.Element;
2182
+
2183
+ export { AccentColor, type AccentDial, AcheryProvider, type AcheryProviderProps, AppBar, type AppBarProps, Avatar, type AvatarProps, type AvatarSize, type AvatarTone, Badge, type BadgeProps, type BadgeTone, Body, type BodyProps, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, ColourInput, type ColourInputProps, type ColumnDef, Combobox, type ComboboxProps, type ComponentSize, ConfirmDialogProvider, type ConfirmOptions, DatePicker, type DatePickerProps, DetailRail, type DetailRailProps, Display, EntityPill, type EntityPillProps, Eyebrow, type EyebrowProps, Field, type FieldProps, Glyph, GlyphAliases, GlyphCategories, type GlyphCategory, type GlyphName, GlyphPicker, type GlyphPickerProps, type GlyphProps, type GlyphSearchResult, Heading, type HeadingProps, Input, type InputProps, type InputStatus, KpiTile, type KpiTileProps, LetterStamp, type LetterStampProps, type LetterStampSize, type LetterStampTone, Marginalia, type MarginaliaProps, MaterialCard, type MaterialCardProps, type MaterialIntensity, type MaterialSignature, Menu, type MenuItemDef, type MenuProps, type MenuSeparator, Modal, type ModalProps, Mono, type MonoProps, type NavGroupDef, type NavItemDef, ProgressBar, type ProgressBarProps, SearchInput, type SearchInputProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, type SelectProps, Sidebar, type SidebarLinkProps, type SidebarProps, SingleCombobox, type SingleComboboxProps, Skeleton, type SkeletonProps, type SortDirection, Sparkline, type SparklineProps, type SparklineTone, StatePill, type StatePillProps, type SubscriptionState, type TabItem, Table, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ThemeMode, type ToastData, ToastProvider, type ToastProviderProps, Toggle, type ToggleProps, Tooltip, type TooltipProps, type TransactionType, TypeTag, type TypeTagProps, glyphCategory, glyphLabel, searchGlyphs, useConfirm, useTheme, useToast, vars };
package/dist/index.d.ts CHANGED
@@ -2075,4 +2075,109 @@ interface MaterialCardProps extends HTMLAttributes<HTMLDivElement> {
2075
2075
  */
2076
2076
  declare function MaterialCard({ intensity, header, footer, children, className, ...props }: MaterialCardProps): react_jsx_runtime.JSX.Element;
2077
2077
 
2078
- export { AccentColor, type AccentDial, AcheryProvider, type AcheryProviderProps, AppBar, type AppBarProps, Avatar, type AvatarProps, type AvatarSize, type AvatarTone, Badge, type BadgeProps, type BadgeTone, Body, type BodyProps, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, type ColumnDef, Combobox, type ComboboxProps, type ComponentSize, ConfirmDialogProvider, type ConfirmOptions, DatePicker, type DatePickerProps, Display, EntityPill, type EntityPillProps, Eyebrow, type EyebrowProps, Field, type FieldProps, Glyph, GlyphAliases, GlyphCategories, type GlyphCategory, type GlyphName, GlyphPicker, type GlyphPickerProps, type GlyphProps, type GlyphSearchResult, Heading, type HeadingProps, Input, type InputProps, type InputStatus, KpiTile, type KpiTileProps, LetterStamp, type LetterStampProps, type LetterStampSize, type LetterStampTone, Marginalia, type MarginaliaProps, MaterialCard, type MaterialCardProps, type MaterialIntensity, type MaterialSignature, Menu, type MenuItemDef, type MenuProps, type MenuSeparator, Modal, type ModalProps, Mono, type MonoProps, type NavGroupDef, type NavItemDef, ProgressBar, type ProgressBarProps, SearchInput, type SearchInputProps, Select, type SelectProps, Sidebar, type SidebarLinkProps, type SidebarProps, SingleCombobox, type SingleComboboxProps, Skeleton, type SkeletonProps, type SortDirection, Sparkline, type SparklineProps, type SparklineTone, StatePill, type StatePillProps, type SubscriptionState, type TabItem, Table, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ThemeMode, type ToastData, ToastProvider, type ToastProviderProps, Toggle, type ToggleProps, Tooltip, type TooltipProps, type TransactionType, TypeTag, type TypeTagProps, glyphCategory, glyphLabel, searchGlyphs, useConfirm, useTheme, useToast, vars };
2078
+ /** Props for the {@link DetailRail} component. */
2079
+ interface DetailRailProps {
2080
+ /** Whether the rail is visible. */
2081
+ open: boolean;
2082
+ /** Called when the user clicks the close button or the backdrop. */
2083
+ onClose: () => void;
2084
+ /** Title rendered in the header. */
2085
+ title: string;
2086
+ /** Optional eyebrow label above the title. */
2087
+ eyebrow?: string;
2088
+ /** Main content area. */
2089
+ children?: ReactNode;
2090
+ /** Footer slot — typically action buttons. */
2091
+ footer?: ReactNode;
2092
+ /**
2093
+ * Width of the rail on desktop.
2094
+ * @default 360
2095
+ */
2096
+ width?: number;
2097
+ className?: string;
2098
+ }
2099
+ /**
2100
+ * A slide-in detail panel that appears from the right on desktop and slides up
2101
+ * from the bottom on mobile (≤640px). Clicking the backdrop or the close button
2102
+ * dismisses it.
2103
+ *
2104
+ * Useful for showing contextual detail alongside a list or table without
2105
+ * navigating away from the page.
2106
+ *
2107
+ * @example
2108
+ * ```tsx
2109
+ * <DetailRail open={!!selected} onClose={() => setSelected(null)} title={selected?.name} eyebrow="Transaction">
2110
+ * <Field label="Amount"><Input value={selected?.amount} /></Field>
2111
+ * </DetailRail>
2112
+ * ```
2113
+ */
2114
+ declare const DetailRail: ({ open, onClose, title, eyebrow, children, footer, width, className, }: DetailRailProps) => react_jsx_runtime.JSX.Element | null;
2115
+
2116
+ /** Props for the {@link ColourInput} component. */
2117
+ interface ColourInputProps {
2118
+ /** Current hex colour value, e.g. `'#c46a3a'`. Defaults to `'#000000'`. */
2119
+ value?: string;
2120
+ /** Called with the new hex colour when the value changes. */
2121
+ onChange?: (value: string) => void;
2122
+ /** When true, applies error border colouring. Pair with {@link Field} `error` prop. */
2123
+ error?: boolean;
2124
+ /** Placeholder shown in the text field when empty. */
2125
+ placeholder?: string;
2126
+ /** Disable the input. */
2127
+ disabled?: boolean;
2128
+ className?: string;
2129
+ style?: HTMLAttributes<HTMLDivElement>['style'];
2130
+ }
2131
+ /**
2132
+ * Hex colour picker combining a native `<input type="color">` swatch and a
2133
+ * text field for direct hex entry. Normalises 3-digit shorthand on blur.
2134
+ * Wrap in {@link Field} to add a label and hint/error text.
2135
+ *
2136
+ * @example
2137
+ * ```tsx
2138
+ * <Field label="Category colour">
2139
+ * <ColourInput value={colour} onChange={setColour} />
2140
+ * </Field>
2141
+ * ```
2142
+ */
2143
+ declare const ColourInput: ({ value, onChange, error, placeholder, disabled, className, style, }: ColourInputProps) => react_jsx_runtime.JSX.Element;
2144
+
2145
+ /** A single option within a {@link SegmentedControl}. */
2146
+ interface SegmentOption<T extends string = string> {
2147
+ value: T;
2148
+ label: ReactNode;
2149
+ }
2150
+ /** Props for the {@link SegmentedControl} component. */
2151
+ interface SegmentedControlProps<T extends string = string> {
2152
+ /** Available options. */
2153
+ options: SegmentOption<T>[];
2154
+ /** Currently selected value. */
2155
+ value: T;
2156
+ /** Called when the user selects a segment. */
2157
+ onChange: (value: T) => void;
2158
+ /**
2159
+ * Size preset.
2160
+ * @default 'md'
2161
+ */
2162
+ size?: 'sm' | 'md' | 'lg';
2163
+ /** Disable all segments. */
2164
+ disabled?: boolean;
2165
+ className?: string;
2166
+ }
2167
+ /**
2168
+ * Inline button group where exactly one option is active. Use for mutually
2169
+ * exclusive view modes or filter toggles where showing all options simultaneously
2170
+ * is worth the space.
2171
+ *
2172
+ * @example
2173
+ * ```tsx
2174
+ * <SegmentedControl
2175
+ * options={[{ value: 'week', label: 'Week' }, { value: 'month', label: 'Month' }]}
2176
+ * value={period}
2177
+ * onChange={setPeriod}
2178
+ * />
2179
+ * ```
2180
+ */
2181
+ declare const SegmentedControl: <T extends string>({ options, value, onChange, size, disabled, className, }: SegmentedControlProps<T>) => react_jsx_runtime.JSX.Element;
2182
+
2183
+ export { AccentColor, type AccentDial, AcheryProvider, type AcheryProviderProps, AppBar, type AppBarProps, Avatar, type AvatarProps, type AvatarSize, type AvatarTone, Badge, type BadgeProps, type BadgeTone, Body, type BodyProps, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, Checkbox, type CheckboxProps, ColourInput, type ColourInputProps, type ColumnDef, Combobox, type ComboboxProps, type ComponentSize, ConfirmDialogProvider, type ConfirmOptions, DatePicker, type DatePickerProps, DetailRail, type DetailRailProps, Display, EntityPill, type EntityPillProps, Eyebrow, type EyebrowProps, Field, type FieldProps, Glyph, GlyphAliases, GlyphCategories, type GlyphCategory, type GlyphName, GlyphPicker, type GlyphPickerProps, type GlyphProps, type GlyphSearchResult, Heading, type HeadingProps, Input, type InputProps, type InputStatus, KpiTile, type KpiTileProps, LetterStamp, type LetterStampProps, type LetterStampSize, type LetterStampTone, Marginalia, type MarginaliaProps, MaterialCard, type MaterialCardProps, type MaterialIntensity, type MaterialSignature, Menu, type MenuItemDef, type MenuProps, type MenuSeparator, Modal, type ModalProps, Mono, type MonoProps, type NavGroupDef, type NavItemDef, ProgressBar, type ProgressBarProps, SearchInput, type SearchInputProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, type SelectProps, Sidebar, type SidebarLinkProps, type SidebarProps, SingleCombobox, type SingleComboboxProps, Skeleton, type SkeletonProps, type SortDirection, Sparkline, type SparklineProps, type SparklineTone, StatePill, type StatePillProps, type SubscriptionState, type TabItem, Table, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type ThemeMode, type ToastData, ToastProvider, type ToastProviderProps, Toggle, type ToggleProps, Tooltip, type TooltipProps, type TransactionType, TypeTag, type TypeTagProps, glyphCategory, glyphLabel, searchGlyphs, useConfirm, useTheme, useToast, vars };
package/dist/index.js CHANGED
@@ -1685,7 +1685,7 @@ function Modal({
1685
1685
  title: title2,
1686
1686
  description: description2,
1687
1687
  children,
1688
- footer: footer3,
1688
+ footer: footer4,
1689
1689
  trigger: trigger3,
1690
1690
  size = "sm",
1691
1691
  scrollable = false,
@@ -1715,7 +1715,7 @@ function Modal({
1715
1715
  /* @__PURE__ */ jsx(RadixDialog.Close, { className: closeButton, "aria-label": "Close", children: /* @__PURE__ */ jsx(Glyph, { name: "cross", size: 14, "aria-hidden": "true" }) })
1716
1716
  ] }),
1717
1717
  /* @__PURE__ */ jsx("div", { className: scrollable ? bodyScrollable : body2, children }),
1718
- footer3 && /* @__PURE__ */ jsx("div", { className: footer, children: footer3 })
1718
+ footer4 && /* @__PURE__ */ jsx("div", { className: footer, children: footer4 })
1719
1719
  ]
1720
1720
  }
1721
1721
  )
@@ -1953,7 +1953,7 @@ var cardHeader = "Card_cardHeader__1uprgrr8";
1953
1953
  function Card({
1954
1954
  variant = "flat",
1955
1955
  padding = "md",
1956
- header: header2,
1956
+ header: header3,
1957
1957
  marginalia: marginalia2,
1958
1958
  marginaliaSize = 80,
1959
1959
  children,
@@ -1966,7 +1966,7 @@ function Card({
1966
1966
  className: [card({ variant, padding }), className].filter(Boolean).join(" "),
1967
1967
  ...props,
1968
1968
  children: [
1969
- header2 && /* @__PURE__ */ jsx("div", { className: cardHeader, children: header2 }),
1969
+ header3 && /* @__PURE__ */ jsx("div", { className: cardHeader, children: header3 }),
1970
1970
  children,
1971
1971
  marginalia2 && /* @__PURE__ */ jsx(Marginalia, { glyph: marginalia2, size: marginaliaSize })
1972
1972
  ]
@@ -2064,7 +2064,7 @@ function Sidebar({
2064
2064
  activeId,
2065
2065
  onItemClick,
2066
2066
  renderLink,
2067
- footer: footer3,
2067
+ footer: footer4,
2068
2068
  collapsed,
2069
2069
  onCollapsedChange,
2070
2070
  mobileOpen,
@@ -2125,7 +2125,7 @@ function Sidebar({
2125
2125
  ),
2126
2126
  searchConfig.kbd && /* @__PURE__ */ jsx("span", { children: searchConfig.kbd })
2127
2127
  ] }),
2128
- footer3 && /* @__PURE__ */ jsx("div", { className: footer2, children: footer3 })
2128
+ footer4 && /* @__PURE__ */ jsx("div", { className: footer2, children: footer4 })
2129
2129
  ] })
2130
2130
  ]
2131
2131
  }
@@ -3247,23 +3247,182 @@ function TypeTag({ type, className }) {
3247
3247
  }
3248
3248
  function MaterialCard({
3249
3249
  intensity = "chrome",
3250
- header: header2,
3251
- footer: footer3,
3250
+ header: header3,
3251
+ footer: footer4,
3252
3252
  children,
3253
3253
  className,
3254
3254
  ...props
3255
3255
  }) {
3256
3256
  const classes = ["material", `m-${intensity}`, className].filter(Boolean).join(" ");
3257
3257
  return /* @__PURE__ */ jsxs("div", { className: classes, ...props, children: [
3258
- header2 !== void 0 && /* @__PURE__ */ jsxs("div", { className: "material__bar", children: [
3258
+ header3 !== void 0 && /* @__PURE__ */ jsxs("div", { className: "material__bar", children: [
3259
3259
  /* @__PURE__ */ jsx("span", { className: "material__mark", "aria-hidden": true }),
3260
- typeof header2 === "string" ? /* @__PURE__ */ jsx("span", { className: "material__title", children: header2 }) : header2
3260
+ typeof header3 === "string" ? /* @__PURE__ */ jsx("span", { className: "material__title", children: header3 }) : header3
3261
3261
  ] }),
3262
3262
  /* @__PURE__ */ jsx("div", { className: "material__body", children }),
3263
- footer3 !== void 0 && /* @__PURE__ */ jsx("div", { className: "material__foot", children: footer3 })
3263
+ footer4 !== void 0 && /* @__PURE__ */ jsx("div", { className: "material__foot", children: footer4 })
3264
3264
  ] });
3265
3265
  }
3266
3266
 
3267
- export { AcheryProvider, AppBar, Avatar, Badge, Body, Button, Card, Checkbox, Combobox, ConfirmDialogProvider, DatePicker, Display, EntityPill, Eyebrow, Field, Glyph, GlyphAliases, GlyphCategories, GlyphPicker, Heading, Input, KpiTile, LetterStamp, Marginalia, MaterialCard, Menu, Modal, Mono, ProgressBar, SearchInput, Select, Sidebar, SingleCombobox, Skeleton, Sparkline, StatePill, Table, Tabs, Textarea, ToastProvider, Toggle, Tooltip, TypeTag, glyphCategory, glyphLabel, searchGlyphs, useConfirm, useTheme, useToast, vars };
3267
+ // src/components/DetailRail/DetailRail.css.ts
3268
+ var backdrop2 = "DetailRail_backdrop__1hfojcp3";
3269
+ var body3 = "DetailRail_body__1hfojcp8";
3270
+ var footer3 = "DetailRail_footer__1hfojcp9";
3271
+ var header2 = "DetailRail_header__1hfojcp6";
3272
+ var headerText = "DetailRail_headerText__1hfojcp7";
3273
+ var rail = "DetailRail_rail__1hfojcp4";
3274
+ var DetailRail = ({
3275
+ open,
3276
+ onClose,
3277
+ title: title2,
3278
+ eyebrow: eyebrow2,
3279
+ children,
3280
+ footer: footer4,
3281
+ width = 360,
3282
+ className
3283
+ }) => {
3284
+ if (!open) return null;
3285
+ const railStyle = { width };
3286
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3287
+ /* @__PURE__ */ jsx("div", { className: backdrop2, onClick: onClose, "aria-hidden": "true" }),
3288
+ /* @__PURE__ */ jsxs(
3289
+ "div",
3290
+ {
3291
+ className: [rail, className].filter(Boolean).join(" "),
3292
+ style: railStyle,
3293
+ role: "complementary",
3294
+ "aria-label": title2,
3295
+ children: [
3296
+ /* @__PURE__ */ jsxs("div", { className: header2, children: [
3297
+ /* @__PURE__ */ jsxs("div", { className: headerText, children: [
3298
+ eyebrow2 && /* @__PURE__ */ jsx(Eyebrow, { children: eyebrow2 }),
3299
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: title2 })
3300
+ ] }),
3301
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", glyph: "cross", onClick: onClose, "aria-label": "Close" })
3302
+ ] }),
3303
+ /* @__PURE__ */ jsx("div", { className: body3, children }),
3304
+ footer4 && /* @__PURE__ */ jsx("div", { className: footer3, children: footer4 })
3305
+ ]
3306
+ }
3307
+ )
3308
+ ] });
3309
+ };
3310
+
3311
+ // src/components/ColourInput/ColourInput.css.ts
3312
+ var prefix = "ColourInput_prefix__1pnau5c4";
3313
+ var root3 = "ColourInput_root__1pnau5c0";
3314
+ var swatch = "ColourInput_swatch__1pnau5c1";
3315
+ var textInput = "ColourInput_textInput__1pnau5c5";
3316
+ var textWrapper = "ColourInput_textWrapper__1pnau5c2";
3317
+ var textWrapperError = "ColourInput_textWrapperError__1pnau5c3";
3318
+ function normalizeHex(raw) {
3319
+ const stripped = raw.replace(/^#+/, "").toLowerCase();
3320
+ if (/^[0-9a-f]{3}$/.test(stripped)) {
3321
+ const [r, g, b] = stripped;
3322
+ return `#${r}${r}${g}${g}${b}${b}`;
3323
+ }
3324
+ if (/^[0-9a-f]{6}$/.test(stripped)) return `#${stripped}`;
3325
+ return null;
3326
+ }
3327
+ var ColourInput = ({
3328
+ value: value2 = "#000000",
3329
+ onChange,
3330
+ error = false,
3331
+ placeholder = "000000",
3332
+ disabled = false,
3333
+ className,
3334
+ style
3335
+ }) => {
3336
+ const [textValue, setTextValue] = useState(value2.replace(/^#/, ""));
3337
+ useEffect(() => {
3338
+ setTextValue(value2.replace(/^#/, ""));
3339
+ }, [value2]);
3340
+ const handleTextChange = (raw) => {
3341
+ const stripped = raw.replace(/^#+/, "");
3342
+ setTextValue(stripped);
3343
+ if (/^[0-9a-fA-F]{6}$/.test(stripped)) {
3344
+ onChange?.(`#${stripped.toLowerCase()}`);
3345
+ }
3346
+ };
3347
+ const handleTextBlur = () => {
3348
+ const normalized = normalizeHex(textValue);
3349
+ if (normalized) {
3350
+ onChange?.(normalized);
3351
+ } else {
3352
+ setTextValue(value2.replace(/^#/, ""));
3353
+ }
3354
+ };
3355
+ const handleSwatchChange = (hex) => {
3356
+ onChange?.(hex);
3357
+ setTextValue(hex.replace(/^#/, ""));
3358
+ };
3359
+ return /* @__PURE__ */ jsxs("div", { className: [root3, className].filter(Boolean).join(" "), style, children: [
3360
+ /* @__PURE__ */ jsx(
3361
+ "input",
3362
+ {
3363
+ type: "color",
3364
+ value: value2,
3365
+ disabled,
3366
+ onChange: (e) => handleSwatchChange(e.target.value),
3367
+ className: swatch
3368
+ }
3369
+ ),
3370
+ /* @__PURE__ */ jsxs("div", { className: [textWrapper, error && textWrapperError].filter(Boolean).join(" "), children: [
3371
+ /* @__PURE__ */ jsx("span", { className: prefix, "aria-hidden": "true", children: "#" }),
3372
+ /* @__PURE__ */ jsx(
3373
+ "input",
3374
+ {
3375
+ type: "text",
3376
+ value: textValue,
3377
+ disabled,
3378
+ onChange: (e) => handleTextChange(e.target.value),
3379
+ onBlur: handleTextBlur,
3380
+ placeholder: placeholder.replace(/^#/, ""),
3381
+ maxLength: 7,
3382
+ className: textInput,
3383
+ "aria-label": "Hex colour",
3384
+ spellCheck: false,
3385
+ autoComplete: "off"
3386
+ }
3387
+ )
3388
+ ] })
3389
+ ] });
3390
+ };
3391
+
3392
+ // src/components/SegmentedControl/SegmentedControl.css.ts
3393
+ var root4 = "SegmentedControl_root__7mno8a0";
3394
+ var segment = "SegmentedControl_segment__7mno8a1";
3395
+ var segmentActive = "SegmentedControl_segmentActive__7mno8a2";
3396
+ var segmentLg = "SegmentedControl_segmentLg__7mno8a4";
3397
+ var segmentSm = "SegmentedControl_segmentSm__7mno8a3";
3398
+ var SegmentedControl = ({
3399
+ options,
3400
+ value: value2,
3401
+ onChange,
3402
+ size = "md",
3403
+ disabled = false,
3404
+ className
3405
+ }) => {
3406
+ const sizeClass = size === "sm" ? segmentSm : size === "lg" ? segmentLg : void 0;
3407
+ return /* @__PURE__ */ jsx("div", { className: [root4, className].filter(Boolean).join(" "), role: "group", children: options.map((opt) => /* @__PURE__ */ jsx(
3408
+ "button",
3409
+ {
3410
+ type: "button",
3411
+ role: "radio",
3412
+ "aria-checked": opt.value === value2,
3413
+ disabled,
3414
+ onClick: () => onChange(opt.value),
3415
+ className: [
3416
+ segment,
3417
+ sizeClass,
3418
+ opt.value === value2 && segmentActive
3419
+ ].filter(Boolean).join(" "),
3420
+ children: opt.label
3421
+ },
3422
+ opt.value
3423
+ )) });
3424
+ };
3425
+
3426
+ export { AcheryProvider, AppBar, Avatar, Badge, Body, Button, Card, Checkbox, ColourInput, Combobox, ConfirmDialogProvider, DatePicker, DetailRail, Display, EntityPill, Eyebrow, Field, Glyph, GlyphAliases, GlyphCategories, GlyphPicker, Heading, Input, KpiTile, LetterStamp, Marginalia, MaterialCard, Menu, Modal, Mono, ProgressBar, SearchInput, SegmentedControl, Select, Sidebar, SingleCombobox, Skeleton, Sparkline, StatePill, Table, Tabs, Textarea, ToastProvider, Toggle, Tooltip, TypeTag, glyphCategory, glyphLabel, searchGlyphs, useConfirm, useTheme, useToast, vars };
3268
3427
  //# sourceMappingURL=index.js.map
3269
3428
  //# sourceMappingURL=index.js.map