highsoft-ui 1.0.140 → 1.0.143
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/CLAUDE.md +75 -0
- package/README.md +56 -3
- package/dist/{Button-Dc8NFRWQ.js → Button-awCDIEXQ.js} +1 -1
- package/dist/{ButtonGroup-CYmrw7gQ.js → ButtonGroup-Cwn0djAz.js} +1 -1
- package/dist/{Checkbox-CErz7eBz.js → Checkbox-CrF45NBl.js} +1 -1
- package/dist/{CodeBlock-BreFXfK5.js → CodeBlock-BIdeK3gz.js} +5 -5
- package/dist/{CookiePolicyModal-DdXZ2d36.js → CookiePolicyModal-CTA02JGV.js} +2 -2
- package/dist/{CopyCode-DH9Jh7PD.js → CopyCode-QiPNPCQN.js} +3 -3
- package/dist/{Dropdown-DbXr3sb-.js → Dropdown-0Vn7yro7.js} +1 -1
- package/dist/{Footer-DtFs2Sgb.js → Footer-BlCmsIDd.js} +9 -9
- package/dist/{FooterBottom-Dtttgp4F.js → FooterBottom-CF5ctutk.js} +1 -1
- package/dist/{FooterHelp-COjjt6h7.js → FooterHelp-BthIJ2ye.js} +1 -1
- package/dist/{FooterLinks-DZ0uH7HO.js → FooterLinks-BBOOTdRf.js} +2 -2
- package/dist/{Header-C7MCiwiz.js → Header-DY4mJxHm.js} +26 -26
- package/dist/{InputGrouped-CIokpRn5.js → InputGrouped-DyxraUpb.js} +12 -12
- package/dist/InputSolo-DUdKtZjX.js +126 -0
- package/dist/{Label-BM4vL0vA.js → Label-DdXaM1Bo.js} +1 -1
- package/dist/{Logo-DTfFHBgU.js → Logo-Bz0G2G-k.js} +69 -92
- package/dist/{NewsletterSignup-Dw9YbhEh.js → NewsletterSignup-BMRnrbw8.js} +5 -5
- package/dist/{Notification-BgmhEw6w.js → Notification-DM31Uzfz.js} +3 -3
- package/dist/{PrefPanel-BG4jW8wc.js → PrefPanel-DDD8R_-o.js} +5 -5
- package/dist/{RoadmapDetails-DXxJNZh9.js → RoadmapDetails-DsLtsnqg.js} +6 -6
- package/dist/{Search-CpJ2XTLG.js → Search-CDOpNByw.js} +12 -12
- package/dist/SearchDropdown-D65lySm_.js +176 -0
- package/dist/{YoutubeModal-DGj2INF0.js → YoutubeModal-CZgbaRB6.js} +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/CopyCode/index.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Footer/CookiePolicyModal.js +1 -1
- package/dist/components/Footer/FooterBottom.js +1 -1
- package/dist/components/Footer/FooterHelp.js +1 -1
- package/dist/components/Footer/FooterLinks.js +1 -1
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/Header/index.js +1 -1
- package/dist/components/InputGrouped/index.js +1 -1
- package/dist/components/InputSolo/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Logo/index.js +1 -1
- package/dist/components/Modal/ModalContactFooter.js +2 -2
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/NewsletterSignup/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/RoadmapDetails/index.js +1 -1
- package/dist/components/Search/index.js +1 -1
- package/dist/components/SearchDropdown/index.js +2 -0
- package/dist/components/Sidebar/NavDisclosure.js +39 -0
- package/dist/components/Sidebar/NavGroup.js +74 -0
- package/dist/components/Sidebar/NavItem.js +28 -0
- package/dist/components/Sidebar/Sidebar.js +107 -0
- package/dist/components/Sidebar/SidebarLayout.js +95 -0
- package/dist/components/Sidebar/SidebarResizer.js +59 -0
- package/dist/components/Sidebar/context.js +18 -0
- package/dist/components/Sidebar/index.js +8 -0
- package/dist/{create-element-B4K6TXvP.js → create-element-CWTzyETe.js} +1 -1
- package/dist/{esm-CDDjSK4f.js → esm-VMwHsplm.js} +26 -12
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/InputSolo/index.d.ts +11 -0
- package/dist/lib/components/Logo/index.d.ts +6 -1
- package/dist/lib/components/SearchDropdown/index.d.ts +69 -0
- package/dist/lib/components/Sidebar/NavDisclosure.d.ts +14 -0
- package/dist/lib/components/Sidebar/NavGroup.d.ts +25 -0
- package/dist/lib/components/Sidebar/NavItem.d.ts +15 -0
- package/dist/lib/components/Sidebar/Sidebar.d.ts +46 -0
- package/dist/lib/components/Sidebar/SidebarLayout.d.ts +41 -0
- package/dist/lib/components/Sidebar/SidebarResizer.d.ts +6 -0
- package/dist/lib/components/Sidebar/context.d.ts +29 -0
- package/dist/lib/components/Sidebar/index.d.ts +13 -0
- package/dist/lib/main.d.ts +5 -1
- package/dist/main.js +36 -27
- package/dist/{prism-light-hml_uDoc.js → prism-light-B3yrtgki.js} +1 -1
- package/dist/styles.module-Bd4HbnpA.js +42 -0
- package/package.json +13 -2
- package/dist/InputSolo-2RPRX0wM.js +0 -123
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type InputSoloVariant = 'default' | 'white';
|
|
3
|
+
/**
|
|
4
|
+
* Field size. Each value pairs with the matching Button/ButtonGroup size for
|
|
5
|
+
* inline layouts:
|
|
6
|
+
* - `100` — compact (28px tall). Matches the outer height of a `ButtonGroup`
|
|
7
|
+
* at `size={100}`, so the two sit flush side by side.
|
|
8
|
+
* - `200` — default (40px tall).
|
|
9
|
+
* - `300` — large (48px tall).
|
|
10
|
+
*/
|
|
11
|
+
export type InputSoloSize = 100 | 200 | 300;
|
|
3
12
|
export interface InputSoloProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
4
13
|
/** Label shown above the input */
|
|
5
14
|
label?: string;
|
|
15
|
+
/** Field size — `100` (compact), `200` (default), `300` (large) */
|
|
16
|
+
size?: InputSoloSize;
|
|
6
17
|
/** Icon element rendered to the left of the input */
|
|
7
18
|
iconLeft?: ReactNode;
|
|
8
19
|
/** Button or action element rendered on the right */
|
|
@@ -4,5 +4,10 @@ export interface LogoProps extends SVGProps<SVGSVGElement> {
|
|
|
4
4
|
showText?: boolean;
|
|
5
5
|
light?: boolean;
|
|
6
6
|
withLink?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Render the mark as single-color line art — the symbol facets are stroked
|
|
9
|
+
* instead of filled. Use for grayscale printing, engraving, or apparel.
|
|
10
|
+
*/
|
|
11
|
+
outline?: boolean;
|
|
7
12
|
}
|
|
8
|
-
export declare function Logo({ title, light, showText, withLink, className, ...props }: LogoProps): import("react").JSX.Element;
|
|
13
|
+
export declare function Logo({ title, light, showText, withLink, outline, className, ...props }: LogoProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InputSoloSize, InputSoloVariant } from '../InputSolo';
|
|
3
|
+
export interface SearchDropdownItem {
|
|
4
|
+
/** Stable unique key for the row. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Text shown in the row and used for match highlighting. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Optional short badge shown on the right (e.g. a category/kind). */
|
|
9
|
+
kind?: ReactNode;
|
|
10
|
+
/** Optional leading icon, rendered before the label. */
|
|
11
|
+
iconLeft?: ReactNode;
|
|
12
|
+
/** Render the row dimmed and non-selectable. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Offset into `label` from which highlighting may start. Use to skip a
|
|
16
|
+
* prefix you don't want matched — e.g. for `Highcharts.Chart`, pass the index
|
|
17
|
+
* just after the dot so only `Chart` highlights. Defaults to `0`.
|
|
18
|
+
*/
|
|
19
|
+
highlightFrom?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface SearchDropdownProps<T extends SearchDropdownItem = SearchDropdownItem> {
|
|
22
|
+
/** Items to search over (built-in filter) or the already-filtered list. */
|
|
23
|
+
items: T[];
|
|
24
|
+
/** Controlled query value. */
|
|
25
|
+
value?: string;
|
|
26
|
+
/** Initial query for uncontrolled usage. */
|
|
27
|
+
defaultValue?: string;
|
|
28
|
+
/** Called on every query change — run your own filter/rank here if needed. */
|
|
29
|
+
onQueryChange?: (query: string) => void;
|
|
30
|
+
/** Called when an item is chosen (click or Enter). */
|
|
31
|
+
onSelect?: (item: T) => void;
|
|
32
|
+
/**
|
|
33
|
+
* How to filter `items` against the query:
|
|
34
|
+
* - `true` (default) — built-in case-insensitive substring match on `label`.
|
|
35
|
+
* - a function — your own predicate `(item, query) => boolean`.
|
|
36
|
+
* - `false` — no filtering; `items` is assumed pre-filtered/ranked by the
|
|
37
|
+
* caller (pair with `onQueryChange`). Highlighting still applies.
|
|
38
|
+
*/
|
|
39
|
+
filter?: boolean | ((item: T, query: string) => boolean);
|
|
40
|
+
/** Placeholder for the input. */
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
/** Visible label above the input. Omit for a bare field. */
|
|
43
|
+
label?: string;
|
|
44
|
+
/** Accessible name for the input. Defaults to `label` then `placeholder`. */
|
|
45
|
+
'aria-label'?: string;
|
|
46
|
+
/** Field size, forwarded to the underlying `InputSolo`. Default `200`. */
|
|
47
|
+
size?: InputSoloSize;
|
|
48
|
+
/** Surface variant, forwarded to `InputSolo`. */
|
|
49
|
+
variant?: InputSoloVariant;
|
|
50
|
+
/** Leading icon for the input. Defaults to a search glyph. */
|
|
51
|
+
iconLeft?: ReactNode;
|
|
52
|
+
/** Render row labels in a monospace font (handy for code/API names). */
|
|
53
|
+
mono?: boolean;
|
|
54
|
+
/** Minimum query length before the popover opens. Default `1`. */
|
|
55
|
+
minChars?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Shown when the query is long enough but nothing matches. Defaults to
|
|
58
|
+
* `'No results'`; pass `null` to hide the popover instead.
|
|
59
|
+
*/
|
|
60
|
+
emptyState?: ReactNode;
|
|
61
|
+
/** Max popover height before it scrolls. Number → px. Default `320`. */
|
|
62
|
+
maxHeight?: number | string;
|
|
63
|
+
/** Class applied to the positioning wrapper. */
|
|
64
|
+
className?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare function SearchDropdown<T extends SearchDropdownItem = SearchDropdownItem>({ items, value, defaultValue, onQueryChange, onSelect, filter, placeholder, label, 'aria-label': ariaLabel, size, variant, iconLeft, mono, minChars, emptyState, maxHeight, className }: SearchDropdownProps<T>): import("react").JSX.Element;
|
|
67
|
+
export declare namespace SearchDropdown {
|
|
68
|
+
var displayName: string;
|
|
69
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface NavDisclosureProps {
|
|
3
|
+
/** Label on the tap-to-expand toggle (shown only on narrow screens). */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Wraps a nav tree so that on narrow / docked layouts it collapses behind a
|
|
10
|
+
* tap-to-expand toggle, keeping content above the fold. On desktop the wrapper
|
|
11
|
+
* is inert (`display: contents`) — the children stay direct flex descendants of
|
|
12
|
+
* the sidebar body and keep their fill-and-scroll behaviour.
|
|
13
|
+
*/
|
|
14
|
+
export declare function NavDisclosure({ label, children, className }: NavDisclosureProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface NavGroupProps {
|
|
3
|
+
/** The group's label, shown on the toggle row. */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Leading icon (16×16) shown before the label. */
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
/** Open on first render (uncontrolled). Ignored when `open` is provided. */
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
/** Controlled open state. Provide together with `onOpenChange`. */
|
|
11
|
+
open?: boolean;
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Marks this group as lying on the path to the active item — tints its
|
|
15
|
+
* guide-line so the trail to the current page stands out. Set it when a
|
|
16
|
+
* descendant <NavItem> is `active`.
|
|
17
|
+
*/
|
|
18
|
+
active?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* An expandable nav node — a toggle row that discloses a nested list of
|
|
23
|
+
* <NavItem>s (or further <NavGroup>s). Works controlled or uncontrolled.
|
|
24
|
+
*/
|
|
25
|
+
export declare function NavGroup({ label, children, icon, defaultOpen, open: openProp, onOpenChange, active, className }: NavGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ElementType, ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type NavItemProps<T extends ElementType = 'a'> = {
|
|
3
|
+
as?: T;
|
|
4
|
+
/** Marks the item as the current page (brand-tinted, aria-current). */
|
|
5
|
+
active?: boolean;
|
|
6
|
+
/** Leading icon (16×16). */
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
} & Omit<ComponentPropsWithoutRef<T>, 'as'>;
|
|
10
|
+
/**
|
|
11
|
+
* A single navigation link. Polymorphic — renders as `<a>` by default, or pass
|
|
12
|
+
* `as={RouterLink}` / `as="button"` for SPA navigation. Selecting an item
|
|
13
|
+
* automatically closes the mobile drawer when inside a <SidebarLayout>.
|
|
14
|
+
*/
|
|
15
|
+
export declare const NavItem: import('react').ForwardRefExoticComponent<Omit<NavItemProps<ElementType>, "ref"> & import('react').RefAttributes<any>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SidebarProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Accessible label for the navigation landmark. */
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
/** Label on the mobile drawer's close button. Default "Close navigation". */
|
|
7
|
+
closeLabel?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The sidebar column. On desktop it's a fixed-position-free flex column filling
|
|
12
|
+
* the layout's first grid track; on narrow screens it becomes an off-canvas
|
|
13
|
+
* drawer driven by the layout's mobile state. Auto-renders the resize handle
|
|
14
|
+
* (when the layout is resizable) and the mobile close button.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Sidebar({ children, 'aria-label': ariaLabel, closeLabel, className }: SidebarProps): import("react").JSX.Element;
|
|
17
|
+
/** Fixed top region of the sidebar (switchers, search, logo). Does not scroll. */
|
|
18
|
+
export declare function SidebarHeader({ children, className }: {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
/** Scrollable body of the sidebar — put nav sections / trees here. */
|
|
23
|
+
export declare function SidebarBody({ children, className }: {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export interface SidebarSectionProps {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
/** Section heading shown above the items. */
|
|
30
|
+
label?: ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Surface a "Minimize" control that collapses every open <NavGroup> in this
|
|
33
|
+
* section. It appears only while at least one group is open. Default false.
|
|
34
|
+
*/
|
|
35
|
+
collapsible?: boolean;
|
|
36
|
+
/** Label on the auto Minimize control. Default "Minimize". */
|
|
37
|
+
minimizeLabel?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Custom control aligned to the right of the label. Overrides the auto
|
|
40
|
+
* Minimize button when provided.
|
|
41
|
+
*/
|
|
42
|
+
action?: ReactNode;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
/** A labelled group of nav items within the sidebar body. */
|
|
46
|
+
export declare function SidebarSection({ children, label, collapsible, minimizeLabel, action, className }: SidebarSectionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface SidebarLayoutProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Initial sidebar width in px. Default 320. */
|
|
5
|
+
defaultWidth?: number;
|
|
6
|
+
/** Smallest the sidebar can be dragged. Default 230. */
|
|
7
|
+
minWidth?: number;
|
|
8
|
+
/** Largest the sidebar can be dragged. Default 460. */
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
/** Show the drag-to-resize handle on desktop. Default true. */
|
|
11
|
+
resizable?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* localStorage key under which the chosen width is remembered. Omit to keep
|
|
14
|
+
* the width only for the current session (no persistence).
|
|
15
|
+
*/
|
|
16
|
+
storageKey?: string;
|
|
17
|
+
/** Label on the mobile "open navigation" trigger bar. Default "Menu". */
|
|
18
|
+
mobileTriggerLabel?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Grow to fill a flex/grid parent (sets `flex: 1 1 auto; min-height: 0`) so
|
|
21
|
+
* the shell takes the available height and the content column scrolls on its
|
|
22
|
+
* own. Default `true` — set `false` for a layout sized to its content.
|
|
23
|
+
*/
|
|
24
|
+
fill?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The resizable two-column shell: a sidebar column (`--hs-sidebar-w` wide) and a
|
|
30
|
+
* fluid content column. Owns the resize width and the mobile drawer state, which
|
|
31
|
+
* <Sidebar>, <SidebarMain> and <NavItem> read from context.
|
|
32
|
+
*
|
|
33
|
+
* On narrow screens (<=760px) the grid collapses to a single column, the sidebar
|
|
34
|
+
* becomes an off-canvas drawer, and a sticky trigger bar appears at the top.
|
|
35
|
+
*/
|
|
36
|
+
export declare function SidebarLayout({ children, defaultWidth, minWidth, maxWidth, resizable, storageKey, mobileTriggerLabel, fill, className, style }: SidebarLayoutProps): import("react").JSX.Element;
|
|
37
|
+
/** The fluid content column that sits beside the sidebar. */
|
|
38
|
+
export declare function SidebarMain({ children, className, ...rest }: {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
} & React.ComponentPropsWithoutRef<'main'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drag handle on the sidebar's right edge. Reads/writes the width through the
|
|
3
|
+
* layout context (which clamps and persists it) and is keyboard-operable via
|
|
4
|
+
* its `role="separator"` + arrow keys. The hatched edge is decorative.
|
|
5
|
+
*/
|
|
6
|
+
export declare function SidebarResizer(): import("react").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface SidebarLayoutContextValue {
|
|
2
|
+
/** Whether the sidebar shows a drag-to-resize handle on desktop. */
|
|
3
|
+
resizable: boolean;
|
|
4
|
+
/** Current sidebar width in px (desktop). */
|
|
5
|
+
width: number;
|
|
6
|
+
/** Clamp + apply + persist a new sidebar width. */
|
|
7
|
+
setWidth: (w: number) => void;
|
|
8
|
+
minWidth: number;
|
|
9
|
+
maxWidth: number;
|
|
10
|
+
/** Whether the mobile off-canvas drawer is open. */
|
|
11
|
+
mobileOpen: boolean;
|
|
12
|
+
openMobile: () => void;
|
|
13
|
+
closeMobile: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const SidebarLayoutContext: import('react').Context<SidebarLayoutContextValue | null>;
|
|
16
|
+
/** Throws when used outside <SidebarLayout> — for components that require it. */
|
|
17
|
+
export declare function useSidebarLayout(): SidebarLayoutContextValue;
|
|
18
|
+
/** Non-throwing accessor — for components that also work standalone (NavItem). */
|
|
19
|
+
export declare function useOptionalSidebarLayout(): SidebarLayoutContextValue | null;
|
|
20
|
+
export interface SidebarSectionContextValue {
|
|
21
|
+
/** Bumped by the section's Minimize control to collapse its open groups. */
|
|
22
|
+
collapseNonce: number;
|
|
23
|
+
/** A descendant <NavGroup> reports its open state so the section knows
|
|
24
|
+
* whether to surface the Minimize control. */
|
|
25
|
+
reportOpen: (id: string, open: boolean) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const SidebarSectionContext: import('react').Context<SidebarSectionContextValue | null>;
|
|
28
|
+
/** Lets a <NavGroup> participate in its section's collapse-all behaviour. */
|
|
29
|
+
export declare function useOptionalSidebarSection(): SidebarSectionContextValue | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { SidebarLayout, SidebarMain } from './SidebarLayout';
|
|
2
|
+
export type { SidebarLayoutProps } from './SidebarLayout';
|
|
3
|
+
export { Sidebar, SidebarHeader, SidebarBody, SidebarSection } from './Sidebar';
|
|
4
|
+
export type { SidebarProps, SidebarSectionProps } from './Sidebar';
|
|
5
|
+
export { SidebarResizer } from './SidebarResizer';
|
|
6
|
+
export { NavItem } from './NavItem';
|
|
7
|
+
export type { NavItemProps } from './NavItem';
|
|
8
|
+
export { NavGroup } from './NavGroup';
|
|
9
|
+
export type { NavGroupProps } from './NavGroup';
|
|
10
|
+
export { NavDisclosure } from './NavDisclosure';
|
|
11
|
+
export type { NavDisclosureProps } from './NavDisclosure';
|
|
12
|
+
export { useSidebarLayout, useOptionalSidebarLayout } from './context';
|
|
13
|
+
export type { SidebarLayoutContextValue } from './context';
|
package/dist/lib/main.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export type { IconProps, IconSize } from './components/Icon';
|
|
|
9
9
|
export type { LinkProps, LinkVariant } from './components/Link';
|
|
10
10
|
export type { ProductIconProps, ProductIconTheme, ProductIconName } from './components/ProductIcon';
|
|
11
11
|
export type { FrameworkIconProps, FrameworkIconTheme, FrameworkIconName } from './components/FrameworkIcon';
|
|
12
|
-
export type { InputSoloProps, InputSoloVariant } from './components/InputSolo';
|
|
12
|
+
export type { InputSoloProps, InputSoloVariant, InputSoloSize } from './components/InputSolo';
|
|
13
|
+
export type { SearchDropdownProps, SearchDropdownItem } from './components/SearchDropdown';
|
|
13
14
|
export type { InputGroupedProps, SelectGroupedProps, FormGroupProps, FormRowProps } from './components/InputGrouped';
|
|
14
15
|
export type { BoxProps } from './components/Box';
|
|
15
16
|
export type { HeaderProps, HeaderPosition, SubHeaderItem } from './components/Header';
|
|
@@ -25,6 +26,7 @@ export { FrameworkIcon } from './components/FrameworkIcon';
|
|
|
25
26
|
export { Button } from './components/Button';
|
|
26
27
|
export { ButtonGroup } from './components/ButtonGroup';
|
|
27
28
|
export { InputSolo } from './components/InputSolo';
|
|
29
|
+
export { SearchDropdown } from './components/SearchDropdown';
|
|
28
30
|
export { InputGrouped, SelectGrouped, FormGroup, FormRow } from './components/InputGrouped';
|
|
29
31
|
export { Container } from './components/Container';
|
|
30
32
|
export { DiscordInvite } from './components/DiscordInvite';
|
|
@@ -53,6 +55,8 @@ export { ModalContactFooter } from './components/Modal/ModalContactFooter';
|
|
|
53
55
|
export type { ModalProps, ModalFooterType, ModalSubmitVariant } from './components/Modal';
|
|
54
56
|
export type { ModalContactFooterProps } from './components/Modal/ModalContactFooter';
|
|
55
57
|
export { Notification } from './components/Notification';
|
|
58
|
+
export { SidebarLayout, SidebarMain, Sidebar, SidebarHeader, SidebarBody, SidebarSection, SidebarResizer, NavItem, NavGroup, NavDisclosure, useSidebarLayout, useOptionalSidebarLayout } from './components/Sidebar';
|
|
59
|
+
export type { SidebarLayoutProps, SidebarProps, SidebarSectionProps, NavItemProps, NavGroupProps, NavDisclosureProps, SidebarLayoutContextValue } from './components/Sidebar';
|
|
56
60
|
export { PrefPanel } from './components/PrefPanel';
|
|
57
61
|
export { ThemeLoader, themeLoaderScript } from './components/ThemeLoader';
|
|
58
62
|
export { useTheme, useClipboard, useSuccessFlash } from './utils';
|
package/dist/main.js
CHANGED
|
@@ -1,33 +1,42 @@
|
|
|
1
1
|
import { c as e, d as t, r as n, s as r, u as i } from "./utils-K9S_6_Eq.js";
|
|
2
2
|
import { t as a } from "./Box-BZgeSeCV.js";
|
|
3
|
-
import { t as o } from "./Button-
|
|
4
|
-
import { t as s } from "./CopyCode-
|
|
3
|
+
import { t as o } from "./Button-awCDIEXQ.js";
|
|
4
|
+
import { t as s } from "./CopyCode-QiPNPCQN.js";
|
|
5
5
|
import { t as c } from "./FrameworkIcon-Ds6WrxO0.js";
|
|
6
|
-
import { t as l } from "./CodeBlock-
|
|
6
|
+
import { t as l } from "./CodeBlock-BIdeK3gz.js";
|
|
7
7
|
import { t as u } from "./Icon-VeXJMj8Q.js";
|
|
8
8
|
import { t as d } from "./Link-CYR92_U0.js";
|
|
9
9
|
import { t as f } from "./ProductIcon-DFLAYWbu.js";
|
|
10
|
-
import { t as p } from "./ButtonGroup-
|
|
11
|
-
import { t as m } from "./InputSolo-
|
|
12
|
-
import {
|
|
13
|
-
import { t as y } from "./
|
|
14
|
-
import { t as b } from "./
|
|
15
|
-
import { t as x } from "./
|
|
16
|
-
import { t as S } from "./
|
|
17
|
-
import { t as C } from "./
|
|
18
|
-
import { t as w } from "./
|
|
19
|
-
import {
|
|
20
|
-
import { t as O } from "./
|
|
21
|
-
import {
|
|
22
|
-
import { t as j } from "./
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { t as I } from "./
|
|
27
|
-
import {
|
|
28
|
-
import { n as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
|
|
10
|
+
import { t as p } from "./ButtonGroup-Cwn0djAz.js";
|
|
11
|
+
import { t as m } from "./InputSolo-DUdKtZjX.js";
|
|
12
|
+
import { t as h } from "./SearchDropdown-D65lySm_.js";
|
|
13
|
+
import { i as g, n as _, r as v, t as y } from "./InputGrouped-DyxraUpb.js";
|
|
14
|
+
import { t as b } from "./Container-BDssaLig.js";
|
|
15
|
+
import { t as x } from "./DiscordInvite-CLYxexdH.js";
|
|
16
|
+
import { t as S } from "./Heading-DNDHqYWO.js";
|
|
17
|
+
import { t as C } from "./Typography-AvvBRu-u.js";
|
|
18
|
+
import { t as w } from "./Logo-Bz0G2G-k.js";
|
|
19
|
+
import { t as T } from "./NewsletterSignup-BMRnrbw8.js";
|
|
20
|
+
import { n as E, r as D, t as O } from "./Dropdown-0Vn7yro7.js";
|
|
21
|
+
import { t as k } from "./PrefPanel-DDD8R_-o.js";
|
|
22
|
+
import { n as A, t as j } from "./Label-DdXaM1Bo.js";
|
|
23
|
+
import { t as M } from "./Footer-BlCmsIDd.js";
|
|
24
|
+
import { n as N } from "./GPTInput-C0YG1990.js";
|
|
25
|
+
import { t as P } from "./Notification-DM31Uzfz.js";
|
|
26
|
+
import { n as F, t as I } from "./Header-DY4mJxHm.js";
|
|
27
|
+
import { t as L } from "./Tabs-BuDaPqdN.js";
|
|
28
|
+
import { n as R, t as z } from "./RadioBox-o1Ssyj0s.js";
|
|
29
|
+
import { n as B, t as V } from "./Checkbox-CrF45NBl.js";
|
|
30
|
+
import { Modal as H } from "./components/Modal/index.js";
|
|
31
|
+
import { t as U } from "./RoadmapDetails-DsLtsnqg.js";
|
|
32
|
+
import { ModalContactFooter as W } from "./components/Modal/ModalContactFooter.js";
|
|
33
|
+
import { useOptionalSidebarLayout as G, useSidebarLayout as K } from "./components/Sidebar/context.js";
|
|
34
|
+
import { SidebarLayout as q, SidebarMain as J } from "./components/Sidebar/SidebarLayout.js";
|
|
35
|
+
import { SidebarResizer as Y } from "./components/Sidebar/SidebarResizer.js";
|
|
36
|
+
import { Sidebar as X, SidebarBody as Z, SidebarHeader as Q, SidebarSection as $ } from "./components/Sidebar/Sidebar.js";
|
|
37
|
+
import { NavItem as ee } from "./components/Sidebar/NavItem.js";
|
|
38
|
+
import { NavGroup as te } from "./components/Sidebar/NavGroup.js";
|
|
39
|
+
import { NavDisclosure as ne } from "./components/Sidebar/NavDisclosure.js";
|
|
40
|
+
import "./components/Sidebar/index.js";
|
|
41
|
+
import { ThemeLoader as re, themeLoaderScript as ie } from "./components/ThemeLoader/index.js";
|
|
42
|
+
export { a as Box, o as Button, p as ButtonGroup, V as Checkbox, B as CheckboxGroup, l as CodeBlock, b as Container, s as CopyCode, x as DiscordInvite, O as Dropdown, E as DropdownItem, D as DropdownSeparator, M as Footer, y as FormGroup, _ as FormRow, c as FrameworkIcon, N as GPTInput, I as Header, S as Heading, u as Icon, v as InputGrouped, m as InputSolo, j as Label, d as Link, w as Logo, H as Modal, W as ModalContactFooter, ne as NavDisclosure, te as NavGroup, ee as NavItem, A as NewTag, T as NewsletterSignup, P as Notification, k as PrefPanel, f as ProductIcon, z as RadioBox, R as RadioBoxGroup, U as RoadmapDetails, h as SearchDropdown, g as SelectGrouped, X as Sidebar, Z as SidebarBody, Q as SidebarHeader, q as SidebarLayout, J as SidebarMain, Y as SidebarResizer, $ as SidebarSection, F as SubHeader, L as Tabs, re as ThemeLoader, i as ThemeProvider, C as Typography, ie as themeLoaderScript, n as useClipboard, t as useNextTheme, G as useOptionalSidebarLayout, K as useSidebarLayout, r as useSuccessFlash, e as useTheme };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e } from "./chunk-jwUa06l-.js";
|
|
2
|
-
import { r as t, t as n } from "./create-element-
|
|
2
|
+
import { r as t, t as n } from "./create-element-CWTzyETe.js";
|
|
3
3
|
import r from "react";
|
|
4
4
|
//#region node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
5
5
|
function i(e, t) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
backdrop: "UvvIVG_backdrop",
|
|
3
|
+
backdropOpen: "UvvIVG_backdropOpen",
|
|
4
|
+
body: "UvvIVG_body",
|
|
5
|
+
close: "UvvIVG_close",
|
|
6
|
+
disclosure: "UvvIVG_disclosure",
|
|
7
|
+
disclosureBody: "UvvIVG_disclosureBody",
|
|
8
|
+
disclosureChevron: "UvvIVG_disclosureChevron",
|
|
9
|
+
disclosureToggle: "UvvIVG_disclosureToggle",
|
|
10
|
+
fill: "UvvIVG_fill",
|
|
11
|
+
groupActive: "UvvIVG_groupActive",
|
|
12
|
+
groupChevron: "UvvIVG_groupChevron",
|
|
13
|
+
groupChildren: "UvvIVG_groupChildren",
|
|
14
|
+
groupChildrenInner: "UvvIVG_groupChildrenInner",
|
|
15
|
+
groupLabel: "UvvIVG_groupLabel",
|
|
16
|
+
groupOpen: "UvvIVG_groupOpen",
|
|
17
|
+
groupToggle: "UvvIVG_groupToggle",
|
|
18
|
+
handle: "UvvIVG_handle",
|
|
19
|
+
hasStickyHead: "UvvIVG_hasStickyHead",
|
|
20
|
+
hatchClip: "UvvIVG_hatchClip",
|
|
21
|
+
hatchDrag: "UvvIVG_hatchDrag",
|
|
22
|
+
hatchHi: "UvvIVG_hatchHi",
|
|
23
|
+
hatchInner: "UvvIVG_hatchInner",
|
|
24
|
+
header: "UvvIVG_header",
|
|
25
|
+
item: "UvvIVG_item",
|
|
26
|
+
itemActive: "UvvIVG_itemActive",
|
|
27
|
+
itemIcon: "UvvIVG_itemIcon",
|
|
28
|
+
itemLabel: "UvvIVG_itemLabel",
|
|
29
|
+
layout: "UvvIVG_layout",
|
|
30
|
+
main: "UvvIVG_main",
|
|
31
|
+
minimizeBtn: "UvvIVG_minimizeBtn",
|
|
32
|
+
mobileBar: "UvvIVG_mobileBar",
|
|
33
|
+
overlay: "UvvIVG_overlay",
|
|
34
|
+
section: "UvvIVG_section",
|
|
35
|
+
sectionHead: "UvvIVG_sectionHead",
|
|
36
|
+
sectionLabel: "UvvIVG_sectionLabel",
|
|
37
|
+
sidebar: "UvvIVG_sidebar",
|
|
38
|
+
sidebarOpen: "UvvIVG_sidebarOpen",
|
|
39
|
+
trigger: "UvvIVG_trigger"
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { e as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "highsoft-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.143",
|
|
4
4
|
"description": "Highsoft UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -35,14 +35,21 @@
|
|
|
35
35
|
"claude"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"
|
|
38
|
+
"generate:api": "node scripts/extract-component-api.mjs",
|
|
39
|
+
"predev": "node scripts/extract-component-api.mjs",
|
|
40
|
+
"dev": "astro dev",
|
|
39
41
|
"build": "tsc -p ./tsconfig.build.json && vite build",
|
|
42
|
+
"build:app": "astro build",
|
|
43
|
+
"preview:app": "astro preview --port 4180",
|
|
44
|
+
"sync:storybook": "node scripts/sync-storybook-index.mjs",
|
|
45
|
+
"test": "node --test",
|
|
40
46
|
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
|
41
47
|
"preview": "vite preview",
|
|
42
48
|
"storybook": "storybook dev -p 6006",
|
|
43
49
|
"build-storybook": "storybook build",
|
|
44
50
|
"prettier": "npx prettier . --write",
|
|
45
51
|
"prettier-ci": "npx prettier . --check",
|
|
52
|
+
"prebuild:app": "node scripts/extract-component-api.mjs",
|
|
46
53
|
"icons": "node scripts/convert-product-icons.cjs",
|
|
47
54
|
"icons:frameworks": "node scripts/convert-framework-icons.cjs",
|
|
48
55
|
"stylelint": "npx stylelint '**/*.css'",
|
|
@@ -63,14 +70,18 @@
|
|
|
63
70
|
"author": "",
|
|
64
71
|
"license": "ISC",
|
|
65
72
|
"dependencies": {
|
|
73
|
+
"@astrojs/react": "^6.0.0",
|
|
74
|
+
"@paper-design/shaders-react": "^0.0.76",
|
|
66
75
|
"@untitled-ui/icons-react": "^0.1.4",
|
|
67
76
|
"addsearch-js-client": "^1.2.1",
|
|
77
|
+
"astro": "^7.0.0",
|
|
68
78
|
"clsx": "^2.1.0",
|
|
69
79
|
"highsoft-design-tokens": "^2.10.0",
|
|
70
80
|
"modern-normalize": "^3.0.1",
|
|
71
81
|
"next-themes": "^0.4.6",
|
|
72
82
|
"radix-ui": "^1.4.1",
|
|
73
83
|
"react-icons": "^5.5.0",
|
|
84
|
+
"react-router-dom": "^7.18.0",
|
|
74
85
|
"react-syntax-highlighter": "^16.1.1"
|
|
75
86
|
},
|
|
76
87
|
"devDependencies": {
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-BWCAbrjV.js";
|
|
2
|
-
import { forwardRef as t, useCallback as n, useEffect as r, useId as i, useRef as a, useState as o } from "react";
|
|
3
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
-
var l = {
|
|
5
|
-
autofilled: "YDdfMa_autofilled",
|
|
6
|
-
buttonSlot: "YDdfMa_buttonSlot",
|
|
7
|
-
default: "YDdfMa_default",
|
|
8
|
-
dirty: "YDdfMa_dirty",
|
|
9
|
-
disabled: "YDdfMa_disabled",
|
|
10
|
-
field: "YDdfMa_field",
|
|
11
|
-
focus: "YDdfMa_focus",
|
|
12
|
-
hasError: "YDdfMa_hasError",
|
|
13
|
-
helpText: "YDdfMa_helpText",
|
|
14
|
-
iconLeft: "YDdfMa_iconLeft",
|
|
15
|
-
inputElement: "YDdfMa_inputElement",
|
|
16
|
-
inputRow: "YDdfMa_inputRow",
|
|
17
|
-
inputSolo: "YDdfMa_inputSolo",
|
|
18
|
-
label: "YDdfMa_label",
|
|
19
|
-
labelRow: "YDdfMa_labelRow",
|
|
20
|
-
onAutoFillStart: "YDdfMa_onAutoFillStart",
|
|
21
|
-
required: "YDdfMa_required",
|
|
22
|
-
success: "YDdfMa_success",
|
|
23
|
-
white: "YDdfMa_white"
|
|
24
|
-
}, u = t(({ label: t, iconLeft: u, button: d, helpText: f, showHelpText: p, variant: m = "default", hasError: h = !1, success: g = !1, disabled: _ = !1, required: v = !1, className: y, wrapperClassName: b, onFocus: x, onBlur: S, id: C, "aria-label": w, "aria-describedby": T, value: E, defaultValue: D, onChange: O, ...k }, A) => {
|
|
25
|
-
let j = a(null), M = A || j, N = i(), [P, F] = o(!1), [I, L] = o(!1), [R, z] = o(D === void 0 ? "" : String(D)), B = E !== void 0, V = p ?? !!f, H = V && f ? `${C ?? N}-help-text` : void 0, U = [T, H].filter(Boolean).join(" ") || void 0, W = B ? String(E ?? "").length > 0 : R.length > 0, G = n((e) => {
|
|
26
|
-
e.animationName.includes("onAutoFillStart") && L(!0);
|
|
27
|
-
}, []);
|
|
28
|
-
r(() => {
|
|
29
|
-
let e = M.current;
|
|
30
|
-
if (!e) return;
|
|
31
|
-
let t = () => {
|
|
32
|
-
try {
|
|
33
|
-
e.matches(":-webkit-autofill") && L(!0);
|
|
34
|
-
} catch {}
|
|
35
|
-
}, n = setTimeout(t, 100), r = setTimeout(t, 500);
|
|
36
|
-
return () => {
|
|
37
|
-
clearTimeout(n), clearTimeout(r);
|
|
38
|
-
};
|
|
39
|
-
}, [M]);
|
|
40
|
-
let K = n((e) => {
|
|
41
|
-
F(!0), x?.(e);
|
|
42
|
-
}, [x]), q = n((e) => {
|
|
43
|
-
F(!1), S?.(e);
|
|
44
|
-
}, [S]), J = n((e) => {
|
|
45
|
-
B || z(e.target.value), O?.(e);
|
|
46
|
-
}, [B, O]);
|
|
47
|
-
return /* @__PURE__ */ c("div", {
|
|
48
|
-
onClick: n(() => {
|
|
49
|
-
!_ && M.current && M.current.focus();
|
|
50
|
-
}, [_, M]),
|
|
51
|
-
className: e("hsui-input-solo", l.inputSolo, {
|
|
52
|
-
[l[m]]: m,
|
|
53
|
-
[l.focus]: P,
|
|
54
|
-
[l.hasError]: h,
|
|
55
|
-
[l.success]: g,
|
|
56
|
-
[l.disabled]: _,
|
|
57
|
-
[l.dirty]: W || I,
|
|
58
|
-
[l.autofilled]: I
|
|
59
|
-
}, b),
|
|
60
|
-
children: [
|
|
61
|
-
t && /* @__PURE__ */ s("div", {
|
|
62
|
-
className: l.labelRow,
|
|
63
|
-
children: C ? /* @__PURE__ */ c("label", {
|
|
64
|
-
className: l.label,
|
|
65
|
-
htmlFor: C,
|
|
66
|
-
children: [t, v && /* @__PURE__ */ s("span", {
|
|
67
|
-
className: l.required,
|
|
68
|
-
children: " *"
|
|
69
|
-
})]
|
|
70
|
-
}) : /* @__PURE__ */ c("span", {
|
|
71
|
-
className: l.label,
|
|
72
|
-
children: [t, v && /* @__PURE__ */ s("span", {
|
|
73
|
-
className: l.required,
|
|
74
|
-
children: " *"
|
|
75
|
-
})]
|
|
76
|
-
})
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ s("div", {
|
|
79
|
-
className: l.field,
|
|
80
|
-
children: /* @__PURE__ */ c("div", {
|
|
81
|
-
className: l.inputRow,
|
|
82
|
-
children: [
|
|
83
|
-
u && /* @__PURE__ */ s("span", {
|
|
84
|
-
className: l.iconLeft,
|
|
85
|
-
children: u
|
|
86
|
-
}),
|
|
87
|
-
/* @__PURE__ */ s("input", {
|
|
88
|
-
ref: M,
|
|
89
|
-
id: C,
|
|
90
|
-
className: e(l.inputElement, y),
|
|
91
|
-
disabled: _,
|
|
92
|
-
required: v,
|
|
93
|
-
"aria-invalid": h,
|
|
94
|
-
"aria-label": w ?? t,
|
|
95
|
-
"aria-describedby": U,
|
|
96
|
-
value: E,
|
|
97
|
-
defaultValue: D,
|
|
98
|
-
onFocus: K,
|
|
99
|
-
onBlur: q,
|
|
100
|
-
onChange: J,
|
|
101
|
-
onAnimationStart: G,
|
|
102
|
-
...k
|
|
103
|
-
}),
|
|
104
|
-
d && /* @__PURE__ */ s("span", {
|
|
105
|
-
className: l.buttonSlot,
|
|
106
|
-
onClick: (e) => e.stopPropagation(),
|
|
107
|
-
onMouseDown: (e) => e.stopPropagation(),
|
|
108
|
-
children: d
|
|
109
|
-
})
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
}),
|
|
113
|
-
V && f && /* @__PURE__ */ s("span", {
|
|
114
|
-
id: H,
|
|
115
|
-
className: l.helpText,
|
|
116
|
-
children: f
|
|
117
|
-
})
|
|
118
|
-
]
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
u.displayName = "InputSolo";
|
|
122
|
-
//#endregion
|
|
123
|
-
export { u as t };
|