@photon-ai/pho-ui 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/README.md +49 -0
- package/dist/chunks/button-9pp4g7en.js +334 -0
- package/dist/chunks/button-9pp4g7en.js.map +1 -0
- package/dist/chunks/close-button-CbQNfpxU.js +30 -0
- package/dist/chunks/close-button-CbQNfpxU.js.map +1 -0
- package/dist/chunks/cn-D6jQqeRj.js +1762 -0
- package/dist/chunks/cn-D6jQqeRj.js.map +1 -0
- package/dist/chunks/dialog-BSBF1Wyq.js +63 -0
- package/dist/chunks/dialog-BSBF1Wyq.js.map +1 -0
- package/dist/chunks/input-aZqjjV_m.js +75 -0
- package/dist/chunks/input-aZqjjV_m.js.map +1 -0
- package/dist/chunks/link-provider-9TFNyDqO.js +28 -0
- package/dist/chunks/link-provider-9TFNyDqO.js.map +1 -0
- package/dist/chunks/menu-BkzDbNuX.js +101 -0
- package/dist/chunks/menu-BkzDbNuX.js.map +1 -0
- package/dist/chunks/resolve-variant-CcD8iG5l.js +9 -0
- package/dist/chunks/resolve-variant-CcD8iG5l.js.map +1 -0
- package/dist/chunks/rolldown-runtime-wKSmTnsc.js +22 -0
- package/dist/components/accordion.js +42 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.js +59 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/autocomplete.js +82 -0
- package/dist/components/autocomplete.js.map +1 -0
- package/dist/components/avatar.js +49 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.js +59 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.js +17 -0
- package/dist/components/checkbox.js +51 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.js +28 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.js +117 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/context-menu.js +63 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/dialog.js +5 -0
- package/dist/components/drawer.js +59 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/field.js +49 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/fieldset.js +26 -0
- package/dist/components/fieldset.js.map +1 -0
- package/dist/components/form.js +17 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/input.js +5 -0
- package/dist/components/kbd.js +18 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/menu.js +7 -0
- package/dist/components/menubar.js +17 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/meter.js +47 -0
- package/dist/components/meter.js.map +1 -0
- package/dist/components/navigation-menu.js +74 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/notification.js +91 -0
- package/dist/components/notification.js.map +1 -0
- package/dist/components/number-field.js +56 -0
- package/dist/components/number-field.js.map +1 -0
- package/dist/components/otp-field.js +19 -0
- package/dist/components/otp-field.js.map +1 -0
- package/dist/components/popover.js +46 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/preview-card.js +31 -0
- package/dist/components/preview-card.js.map +1 -0
- package/dist/components/progress.js +47 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.js +34 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/scroll-area.js +43 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.js +69 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.js +17 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/slider.js +61 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/switch.js +28 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.js +42 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/toast.js +60 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/toggle-group.js +17 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.js +33 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/toolbar.js +55 -0
- package/dist/components/toolbar.js.map +1 -0
- package/dist/components/tooltip.js +32 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/icons.js +192 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.js +30 -0
- package/dist/primitives/accordion.js +3 -0
- package/dist/primitives/alert-dialog.js +3 -0
- package/dist/primitives/autocomplete.js +3 -0
- package/dist/primitives/avatar.js +3 -0
- package/dist/primitives/button.js +3 -0
- package/dist/primitives/checkbox-group.js +3 -0
- package/dist/primitives/checkbox.js +3 -0
- package/dist/primitives/collapsible.js +3 -0
- package/dist/primitives/combobox.js +3 -0
- package/dist/primitives/context-menu.js +3 -0
- package/dist/primitives/csp-provider.js +3 -0
- package/dist/primitives/dialog.js +3 -0
- package/dist/primitives/direction-provider.js +3 -0
- package/dist/primitives/drawer.js +3 -0
- package/dist/primitives/field.js +3 -0
- package/dist/primitives/fieldset.js +3 -0
- package/dist/primitives/form.js +3 -0
- package/dist/primitives/input.js +3 -0
- package/dist/primitives/menu.js +3 -0
- package/dist/primitives/menubar.js +3 -0
- package/dist/primitives/meter.js +3 -0
- package/dist/primitives/navigation-menu.js +3 -0
- package/dist/primitives/number-field.js +3 -0
- package/dist/primitives/otp-field.js +3 -0
- package/dist/primitives/popover.js +3 -0
- package/dist/primitives/preview-card.js +3 -0
- package/dist/primitives/progress.js +3 -0
- package/dist/primitives/radio-group.js +3 -0
- package/dist/primitives/radio.js +3 -0
- package/dist/primitives/scroll-area.js +3 -0
- package/dist/primitives/select.js +3 -0
- package/dist/primitives/separator.js +3 -0
- package/dist/primitives/slider.js +3 -0
- package/dist/primitives/switch.js +3 -0
- package/dist/primitives/tabs.js +3 -0
- package/dist/primitives/toast.js +3 -0
- package/dist/primitives/toggle-group.js +3 -0
- package/dist/primitives/toggle.js +3 -0
- package/dist/primitives/toolbar.js +3 -0
- package/dist/primitives/tooltip.js +3 -0
- package/dist/primitives.js +84 -0
- package/dist/primitives.js.map +1 -0
- package/dist/src/components/accordion/accordion.d.ts +24 -0
- package/dist/src/components/accordion/index.d.ts +1 -0
- package/dist/src/components/alert-dialog/alert-dialog.d.ts +41 -0
- package/dist/src/components/alert-dialog/index.d.ts +1 -0
- package/dist/src/components/autocomplete/autocomplete.d.ts +38 -0
- package/dist/src/components/autocomplete/index.d.ts +1 -0
- package/dist/src/components/avatar/avatar.d.ts +40 -0
- package/dist/src/components/avatar/index.d.ts +1 -0
- package/dist/src/components/badge/badge.d.ts +63 -0
- package/dist/src/components/badge/index.d.ts +1 -0
- package/dist/src/components/button/button.d.ts +196 -0
- package/dist/src/components/button/close-button.d.ts +28 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/checkbox/checkbox-group.d.ts +15 -0
- package/dist/src/components/checkbox/checkbox.d.ts +20 -0
- package/dist/src/components/checkbox/index.d.ts +2 -0
- package/dist/src/components/collapsible/collapsible.d.ts +20 -0
- package/dist/src/components/collapsible/index.d.ts +1 -0
- package/dist/src/components/combobox/combobox.d.ts +49 -0
- package/dist/src/components/combobox/index.d.ts +1 -0
- package/dist/src/components/context-menu/context-menu.d.ts +34 -0
- package/dist/src/components/context-menu/index.d.ts +1 -0
- package/dist/src/components/dialog/dialog.d.ts +41 -0
- package/dist/src/components/dialog/index.d.ts +1 -0
- package/dist/src/components/drawer/drawer.d.ts +32 -0
- package/dist/src/components/drawer/index.d.ts +1 -0
- package/dist/src/components/field/field.d.ts +27 -0
- package/dist/src/components/field/index.d.ts +1 -0
- package/dist/src/components/fieldset/fieldset.d.ts +18 -0
- package/dist/src/components/fieldset/index.d.ts +1 -0
- package/dist/src/components/form/form.d.ts +14 -0
- package/dist/src/components/form/index.d.ts +1 -0
- package/dist/src/components/input/index.d.ts +1 -0
- package/dist/src/components/input/input.d.ts +30 -0
- package/dist/src/components/kbd/index.d.ts +1 -0
- package/dist/src/components/kbd/kbd.d.ts +18 -0
- package/dist/src/components/menu/index.d.ts +1 -0
- package/dist/src/components/menu/menu.d.ts +47 -0
- package/dist/src/components/menubar/index.d.ts +1 -0
- package/dist/src/components/menubar/menubar.d.ts +14 -0
- package/dist/src/components/meter/index.d.ts +1 -0
- package/dist/src/components/meter/meter.d.ts +24 -0
- package/dist/src/components/navigation-menu/index.d.ts +1 -0
- package/dist/src/components/navigation-menu/navigation-menu.d.ts +35 -0
- package/dist/src/components/notification/index.d.ts +1 -0
- package/dist/src/components/notification/notification.d.ts +73 -0
- package/dist/src/components/number-field/index.d.ts +1 -0
- package/dist/src/components/number-field/number-field.d.ts +28 -0
- package/dist/src/components/otp-field/index.d.ts +1 -0
- package/dist/src/components/otp-field/otp-field.d.ts +17 -0
- package/dist/src/components/popover/index.d.ts +1 -0
- package/dist/src/components/popover/popover.d.ts +27 -0
- package/dist/src/components/preview-card/index.d.ts +1 -0
- package/dist/src/components/preview-card/preview-card.d.ts +22 -0
- package/dist/src/components/progress/index.d.ts +1 -0
- package/dist/src/components/progress/progress.d.ts +24 -0
- package/dist/src/components/radio-group/index.d.ts +1 -0
- package/dist/src/components/radio-group/radio-group.d.ts +28 -0
- package/dist/src/components/scroll-area/index.d.ts +1 -0
- package/dist/src/components/scroll-area/scroll-area.d.ts +25 -0
- package/dist/src/components/select/index.d.ts +1 -0
- package/dist/src/components/select/select.d.ts +36 -0
- package/dist/src/components/separator/index.d.ts +1 -0
- package/dist/src/components/separator/separator.d.ts +14 -0
- package/dist/src/components/slider/index.d.ts +1 -0
- package/dist/src/components/slider/slider.d.ts +30 -0
- package/dist/src/components/switch/index.d.ts +1 -0
- package/dist/src/components/switch/switch.d.ts +18 -0
- package/dist/src/components/tabs/index.d.ts +1 -0
- package/dist/src/components/tabs/tabs.d.ts +24 -0
- package/dist/src/components/toast/index.d.ts +1 -0
- package/dist/src/components/toast/toast.d.ts +34 -0
- package/dist/src/components/toggle/index.d.ts +1 -0
- package/dist/src/components/toggle/toggle.d.ts +33 -0
- package/dist/src/components/toggle-group/index.d.ts +1 -0
- package/dist/src/components/toggle-group/toggle-group.d.ts +15 -0
- package/dist/src/components/toolbar/index.d.ts +1 -0
- package/dist/src/components/toolbar/toolbar.d.ts +28 -0
- package/dist/src/components/tooltip/index.d.ts +1 -0
- package/dist/src/components/tooltip/tooltip.d.ts +23 -0
- package/dist/src/icons/discord.d.ts +3 -0
- package/dist/src/icons/github.d.ts +3 -0
- package/dist/src/icons/google.d.ts +3 -0
- package/dist/src/icons/imessage.d.ts +3 -0
- package/dist/src/icons/index.d.ts +18 -0
- package/dist/src/icons/photon-mark.d.ts +3 -0
- package/dist/src/icons/reddit.d.ts +3 -0
- package/dist/src/icons/slack.d.ts +3 -0
- package/dist/src/icons/telegram.d.ts +3 -0
- package/dist/src/icons/whatsapp.d.ts +3 -0
- package/dist/src/icons/x.d.ts +3 -0
- package/dist/src/icons/youtube.d.ts +3 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/primitives/accordion.d.ts +5 -0
- package/dist/src/primitives/alert-dialog.d.ts +5 -0
- package/dist/src/primitives/autocomplete.d.ts +5 -0
- package/dist/src/primitives/avatar.d.ts +5 -0
- package/dist/src/primitives/button.d.ts +5 -0
- package/dist/src/primitives/checkbox-group.d.ts +5 -0
- package/dist/src/primitives/checkbox.d.ts +5 -0
- package/dist/src/primitives/collapsible.d.ts +5 -0
- package/dist/src/primitives/combobox.d.ts +5 -0
- package/dist/src/primitives/context-menu.d.ts +5 -0
- package/dist/src/primitives/csp-provider.d.ts +5 -0
- package/dist/src/primitives/dialog.d.ts +5 -0
- package/dist/src/primitives/direction-provider.d.ts +5 -0
- package/dist/src/primitives/drawer.d.ts +5 -0
- package/dist/src/primitives/field.d.ts +5 -0
- package/dist/src/primitives/fieldset.d.ts +5 -0
- package/dist/src/primitives/form.d.ts +5 -0
- package/dist/src/primitives/index.d.ts +44 -0
- package/dist/src/primitives/input.d.ts +5 -0
- package/dist/src/primitives/menu.d.ts +5 -0
- package/dist/src/primitives/menubar.d.ts +5 -0
- package/dist/src/primitives/meter.d.ts +5 -0
- package/dist/src/primitives/navigation-menu.d.ts +5 -0
- package/dist/src/primitives/number-field.d.ts +5 -0
- package/dist/src/primitives/otp-field.d.ts +5 -0
- package/dist/src/primitives/popover.d.ts +5 -0
- package/dist/src/primitives/preview-card.d.ts +5 -0
- package/dist/src/primitives/progress.d.ts +5 -0
- package/dist/src/primitives/radio-group.d.ts +5 -0
- package/dist/src/primitives/radio.d.ts +5 -0
- package/dist/src/primitives/scroll-area.d.ts +5 -0
- package/dist/src/primitives/select.d.ts +5 -0
- package/dist/src/primitives/separator.d.ts +5 -0
- package/dist/src/primitives/slider.d.ts +5 -0
- package/dist/src/primitives/switch.d.ts +5 -0
- package/dist/src/primitives/tabs.d.ts +5 -0
- package/dist/src/primitives/toast.d.ts +5 -0
- package/dist/src/primitives/toggle-group.d.ts +5 -0
- package/dist/src/primitives/toggle.d.ts +5 -0
- package/dist/src/primitives/toolbar.d.ts +5 -0
- package/dist/src/primitives/tooltip.d.ts +5 -0
- package/dist/src/utils/cn.d.ts +3 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/is-react-component.d.ts +9 -0
- package/dist/src/utils/link-provider.d.ts +17 -0
- package/dist/src/utils/resolve-variant.d.ts +19 -0
- package/dist/utils.js +11 -0
- package/package.json +406 -0
- package/src/styles/fonts.css +20 -0
- package/src/styles/pho.css +50 -0
- package/src/styles/theme.css +289 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Toggle as BaseToggle } from '@base-ui/react/toggle';
|
|
3
|
+
/** Size axis — three square icon sizes. `md` is default. */
|
|
4
|
+
export declare const TOGGLE_SIZES: {
|
|
5
|
+
sm: {
|
|
6
|
+
classes: string;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
classes: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
lg: {
|
|
14
|
+
classes: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type ToggleSize = keyof typeof TOGGLE_SIZES;
|
|
19
|
+
export interface ToggleProps extends Omit<ComponentProps<typeof BaseToggle>, "className"> {
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Size variant. @default "md" */
|
|
22
|
+
size?: ToggleSize;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A two-state button (pressed / not pressed) built on Base UI `Toggle` — the
|
|
26
|
+
* canonical Bold/Italic toolbar control. Controlled via `pressed` /
|
|
27
|
+
* `onPressedChange` or uncontrolled via `defaultPressed`. For a set of related
|
|
28
|
+
* toggles, use `ToggleGroup`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function Toggle({ className, size, ...props }: ToggleProps): import("react").JSX.Element;
|
|
31
|
+
export declare namespace Toggle {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ToggleGroup, type ToggleGroupProps } from './toggle-group';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { ToggleGroup as BaseToggleGroup } from '@base-ui/react/toggle-group';
|
|
3
|
+
export interface ToggleGroupProps extends Omit<ComponentProps<typeof BaseToggleGroup>, "className"> {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Groups related `Toggle` buttons with shared roving-focus keyboard
|
|
8
|
+
* navigation, built on Base UI `ToggleGroup`. Single-select by default; set
|
|
9
|
+
* `toggleMultiple` to allow several pressed at once. Track selection with
|
|
10
|
+
* `value` / `onValueChange` (an array) or `defaultValue`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ToggleGroup({ className, ...props }: ToggleGroupProps): import("react").JSX.Element;
|
|
13
|
+
export declare namespace ToggleGroup {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toolbar } from './toolbar';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { Toolbar as BaseToolbar } from '@base-ui/react/toolbar';
|
|
3
|
+
/** Override Base UI's `string | (state) => string` className with plain string. */
|
|
4
|
+
type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Root({ className, ...props }: StyledProps<typeof BaseToolbar.Root>): import("react").JSX.Element;
|
|
8
|
+
declare function Button({ className, ...props }: StyledProps<typeof BaseToolbar.Button>): import("react").JSX.Element;
|
|
9
|
+
declare function Link({ className, ...props }: StyledProps<typeof BaseToolbar.Link>): import("react").JSX.Element;
|
|
10
|
+
declare function Group({ className, ...props }: StyledProps<typeof BaseToolbar.Group>): import("react").JSX.Element;
|
|
11
|
+
declare function Input({ className, ...props }: StyledProps<typeof BaseToolbar.Input>): import("react").JSX.Element;
|
|
12
|
+
declare function Separator({ className, ...props }: StyledProps<typeof BaseToolbar.Separator>): import("react").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Toolbar built on Base UI `Toolbar` — a single tab stop grouping related
|
|
15
|
+
* controls with arrow-key navigation between them (formatting bars, editor
|
|
16
|
+
* controls). Holds `Toolbar.Button`, `Link`, `Input`, and `Separator`; for
|
|
17
|
+
* pressable formatting buttons, wrap `Toggle` / `ToggleGroup` with
|
|
18
|
+
* `Toolbar.Button render={…}`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const Toolbar: {
|
|
21
|
+
Root: typeof Root;
|
|
22
|
+
Button: typeof Button;
|
|
23
|
+
Link: typeof Link;
|
|
24
|
+
Group: typeof Group;
|
|
25
|
+
Input: typeof Input;
|
|
26
|
+
Separator: typeof Separator;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from './tooltip';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
3
|
+
/** Override Base UI's `string | (state) => string` className with plain string. */
|
|
4
|
+
type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Positioner({ className, sideOffset, ...props }: StyledProps<typeof BaseTooltip.Positioner>): import("react").JSX.Element;
|
|
8
|
+
declare function Popup({ className, ...props }: StyledProps<typeof BaseTooltip.Popup>): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Tooltip built on Base UI `Tooltip` — a brief, hover/focus-triggered label for
|
|
11
|
+
* an icon or control. Wrap your app (or a subtree) in `Tooltip.Provider` to
|
|
12
|
+
* share open/close timing. The trigger must be a focusable element. Never put
|
|
13
|
+
* essential or interactive content in a tooltip; use `Popover` for that.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Tooltip: {
|
|
16
|
+
Provider: import('react').FC<import('@base-ui/react').TooltipProviderProps>;
|
|
17
|
+
Root: <Payload>(props: BaseTooltip.Root.Props<Payload>) => import("react").JSX.Element;
|
|
18
|
+
Trigger: BaseTooltip.Trigger;
|
|
19
|
+
Portal: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').TooltipPortalProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Positioner: typeof Positioner;
|
|
21
|
+
Popup: typeof Popup;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
import { DiscordIcon } from './discord';
|
|
3
|
+
import { GitHubIcon } from './github';
|
|
4
|
+
import { GoogleIcon } from './google';
|
|
5
|
+
import { IMessageIcon } from './imessage';
|
|
6
|
+
import { PhotonMark } from './photon-mark';
|
|
7
|
+
import { RedditIcon } from './reddit';
|
|
8
|
+
import { SlackIcon } from './slack';
|
|
9
|
+
import { TelegramIcon } from './telegram';
|
|
10
|
+
import { WhatsAppIcon } from './whatsapp';
|
|
11
|
+
import { XIcon } from './x';
|
|
12
|
+
import { YouTubeIcon } from './youtube';
|
|
13
|
+
export { DiscordIcon, GitHubIcon, GoogleIcon, IMessageIcon, PhotonMark, RedditIcon, SlackIcon, TelegramIcon, WhatsAppIcon, XIcon, YouTubeIcon, };
|
|
14
|
+
/** Third-party marks in gallery order (Photon's own mark ships separately). */
|
|
15
|
+
export declare const brandMarks: {
|
|
16
|
+
name: string;
|
|
17
|
+
Icon: FC<ComponentProps<"svg">>;
|
|
18
|
+
}[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @photon-ai/pho-ui — Pho Design System
|
|
3
|
+
*
|
|
4
|
+
* Prefer the granular entry points for best tree-shaking, e.g.
|
|
5
|
+
* import { Button } from "@photon-ai/pho-ui/components/button";
|
|
6
|
+
* This root barrel re-exports everything for convenience.
|
|
7
|
+
*/
|
|
8
|
+
export * from './utils';
|
|
9
|
+
export * from './components/button';
|
|
10
|
+
export * from './components/input';
|
|
11
|
+
export * from './components/dialog';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base UI primitives, re-exported.
|
|
3
|
+
* AUTO-GENERATED by scripts/generate-primitives.ts — do not edit.
|
|
4
|
+
*/
|
|
5
|
+
export * from './accordion';
|
|
6
|
+
export * from './alert-dialog';
|
|
7
|
+
export * from './autocomplete';
|
|
8
|
+
export * from './avatar';
|
|
9
|
+
export * from './button';
|
|
10
|
+
export * from './checkbox';
|
|
11
|
+
export * from './checkbox-group';
|
|
12
|
+
export * from './collapsible';
|
|
13
|
+
export * from './combobox';
|
|
14
|
+
export * from './context-menu';
|
|
15
|
+
export * from './csp-provider';
|
|
16
|
+
export * from './dialog';
|
|
17
|
+
export * from './direction-provider';
|
|
18
|
+
export * from './drawer';
|
|
19
|
+
export * from './field';
|
|
20
|
+
export * from './fieldset';
|
|
21
|
+
export * from './form';
|
|
22
|
+
export * from './input';
|
|
23
|
+
export * from './menu';
|
|
24
|
+
export * from './menubar';
|
|
25
|
+
export * from './meter';
|
|
26
|
+
export * from './navigation-menu';
|
|
27
|
+
export * from './number-field';
|
|
28
|
+
export * from './otp-field';
|
|
29
|
+
export * from './popover';
|
|
30
|
+
export * from './preview-card';
|
|
31
|
+
export * from './progress';
|
|
32
|
+
export * from './radio';
|
|
33
|
+
export * from './radio-group';
|
|
34
|
+
export * from './scroll-area';
|
|
35
|
+
export * from './select';
|
|
36
|
+
export * from './separator';
|
|
37
|
+
export * from './slider';
|
|
38
|
+
export * from './switch';
|
|
39
|
+
export * from './tabs';
|
|
40
|
+
export * from './toast';
|
|
41
|
+
export * from './toggle';
|
|
42
|
+
export * from './toggle-group';
|
|
43
|
+
export * from './toolbar';
|
|
44
|
+
export * from './tooltip';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Distinguish an icon passed as a *component* (e.g. a Phosphor icon or any
|
|
4
|
+
* `FC`/forwardRef) from one passed as an already-rendered *element*. Lets icon
|
|
5
|
+
* props accept either form: `prefix={Plus}` or `prefix={<Plus />}`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isReactComponent(value: unknown): value is ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ComponentType, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The shape a host app's link component must satisfy. Routers (TanStack Router,
|
|
4
|
+
* React Router, Next.js) expose a `Link` that takes `href` + anchor props; this
|
|
5
|
+
* lets Pho components render real client-side links without depending on any
|
|
6
|
+
* specific router.
|
|
7
|
+
*/
|
|
8
|
+
export type LinkComponent = ComponentType<AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
9
|
+
href: string;
|
|
10
|
+
}>;
|
|
11
|
+
/** Inject the host router's link component for all Pho links beneath it. */
|
|
12
|
+
export declare function LinkProvider({ component, children, }: {
|
|
13
|
+
component: LinkComponent;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** Read the active link component (falls back to a plain `<a>`). */
|
|
17
|
+
export declare function useLinkComponent(): LinkComponent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single option within a variant axis: the Tailwind classes it applies plus a
|
|
3
|
+
* human description (surfaced in docs and the future component registry).
|
|
4
|
+
*/
|
|
5
|
+
export interface VariantDef {
|
|
6
|
+
classes: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
/** One variant axis — maps each option name to its definition. */
|
|
10
|
+
export type VariantMap = Record<string, VariantDef>;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the Tailwind classes for a chosen option of a variant axis.
|
|
13
|
+
* Returns `""` for an unknown key so callers can compose safely with `cn`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const SIZE = { sm: { classes: "h-6 px-2" }, md: { classes: "h-9 px-3" } };
|
|
17
|
+
* cn(base, resolveVariant(SIZE, size));
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveVariant<M extends VariantMap>(map: M, key: keyof M | (string & {})): string;
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as r } from "./chunks/cn-D6jQqeRj.js";
|
|
3
|
+
import { n as e, r as n, t as i } from "./chunks/link-provider-9TFNyDqO.js";
|
|
4
|
+
import { t as a } from "./chunks/resolve-variant-CcD8iG5l.js";
|
|
5
|
+
export {
|
|
6
|
+
i as LinkProvider,
|
|
7
|
+
r as cn,
|
|
8
|
+
n as isReactComponent,
|
|
9
|
+
a as resolveVariant,
|
|
10
|
+
e as useLinkComponent
|
|
11
|
+
};
|