burne-ui 1.5.0 → 1.5.4
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/cli/init.js +14 -5
- package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +1 -1
- package/dist/components/core/Button/buttonStyles.d.ts +1 -1
- package/dist/components/core/Card/cardStyles.d.ts +3 -3
- package/dist/components/core/Dialog/dialogStyles.d.ts +1 -1
- package/dist/components/core/Drawer/drawerStyles.d.ts +3 -3
- package/dist/components/core/Dropdown/dropdownParts.d.ts +1 -0
- package/dist/components/core/Dropdown/dropdownTypes.d.ts +3 -0
- package/dist/components/core/Dropdown/index.d.ts +2 -0
- package/dist/components/core/Pagination/paginationStyles.d.ts +5 -5
- package/dist/components/core/Table/tableStyles.d.ts +1 -1
- package/dist/components/core/ToggleButton/useToggleButtonFillAnimation.d.ts +5 -0
- package/dist/index.cjs +10 -10
- package/dist/index.js +5126 -5094
- package/dist/ui.css +30 -2
- package/package.json +1 -1
package/cli/init.js
CHANGED
|
@@ -139,18 +139,26 @@ export function BurneProviders({ children }: { children: React.ReactNode }) {
|
|
|
139
139
|
*/
|
|
140
140
|
function resolveProviderPath(cwd, framework) {
|
|
141
141
|
if (framework === "vite") {
|
|
142
|
-
const dir = path.join(cwd, "src"
|
|
142
|
+
const dir = path.join(cwd, "src");
|
|
143
143
|
return {
|
|
144
144
|
dir,
|
|
145
145
|
file: path.join(dir, "burne-providers.tsx"),
|
|
146
|
-
importHint: "./
|
|
146
|
+
importHint: "./burne-providers",
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const dir = path.join(cwd, "app");
|
|
150
|
+
const srcApp = path.join(cwd, "src", "app");
|
|
151
|
+
if (fs.existsSync(srcApp) && !fs.existsSync(dir)) {
|
|
152
|
+
return {
|
|
153
|
+
dir: srcApp,
|
|
154
|
+
file: path.join(srcApp, "burne-providers.tsx"),
|
|
155
|
+
importHint: "./burne-providers",
|
|
147
156
|
};
|
|
148
157
|
}
|
|
149
|
-
const dir = path.join(cwd, "components", "providers");
|
|
150
158
|
return {
|
|
151
159
|
dir,
|
|
152
160
|
file: path.join(dir, "burne-providers.tsx"),
|
|
153
|
-
importHint: "
|
|
161
|
+
importHint: "./burne-providers",
|
|
154
162
|
};
|
|
155
163
|
}
|
|
156
164
|
|
|
@@ -174,6 +182,7 @@ createRoot(document.getElementById("root")!).render(
|
|
|
174
182
|
}
|
|
175
183
|
return `// app/layout.tsx
|
|
176
184
|
import { BurneProviders } from "${importHint}";
|
|
185
|
+
import "./globals.css";
|
|
177
186
|
|
|
178
187
|
export default function RootLayout({ children }) {
|
|
179
188
|
return (
|
|
@@ -288,7 +297,7 @@ export async function runInit(argv, cliVersion) {
|
|
|
288
297
|
console.log(`\nburne-ui init v${cliVersion}`);
|
|
289
298
|
console.log(
|
|
290
299
|
framework === "unknown"
|
|
291
|
-
? "Framework: not detected (will use
|
|
300
|
+
? "Framework: not detected (will use app/burne-providers.tsx)\n"
|
|
292
301
|
: `Detected: ${framework}\n`,
|
|
293
302
|
);
|
|
294
303
|
|
|
@@ -14,7 +14,7 @@ export declare const ALERT_DIALOG_INDICATOR_CLASS = "shrink-0 [&_svg]:block";
|
|
|
14
14
|
export declare const ALERT_DIALOG_HEADER_CLASS = "shrink-0";
|
|
15
15
|
export declare const ALERT_DIALOG_HEADING_BLOCK_CLASS = "contents";
|
|
16
16
|
export declare const ALERT_DIALOG_TITLE_CLASS = "font-w-mid";
|
|
17
|
-
export declare const ALERT_DIALOG_BODY_BASE_CLASS = "min-h-0 flex-1 overflow-y-auto";
|
|
17
|
+
export declare const ALERT_DIALOG_BODY_BASE_CLASS = "min-h-0 flex-1 overflow-y-auto py-small";
|
|
18
18
|
export declare const ALERT_DIALOG_FOOTER_CLASS = "flex shrink-0 flex-wrap items-center justify-end gap-base";
|
|
19
19
|
export declare function alertDialogPanelSurfaceClass(variant: AlertVariant): string;
|
|
20
20
|
export declare function alertDialogOverlayClass(lightUi: boolean, slotClass?: string): string;
|
|
@@ -23,7 +23,7 @@ export declare const BUTTON_LABEL_LAYER_CLASS = "col-start-1 row-start-1 inline-
|
|
|
23
23
|
export declare const BUTTON_LEFT_ICON_SLOT_CLASS = "inline-flex shrink-0 items-center justify-center";
|
|
24
24
|
export declare const BUTTON_LABEL_TEXT_CLASS = "min-w-0 shrink";
|
|
25
25
|
export declare const BUTTON_ASYNC_GRID_LAYER_CLASS = "col-start-1 row-start-1 flex items-center justify-center";
|
|
26
|
-
/** SSR
|
|
26
|
+
/** SSR: inactive layers hidden in `styles.css` via `[data-button-async-layer][aria-hidden="true"]` */
|
|
27
27
|
export declare const BUTTON_ASYNC_LAYER_DATA_ATTR = "data-button-async-layer";
|
|
28
28
|
export declare const BUTTON_SUCCESS_LAYER_CLASS = "text-success";
|
|
29
29
|
export declare const BUTTON_ERROR_LAYER_CLASS = "text-danger";
|
|
@@ -7,12 +7,12 @@ export declare const CARD_ROOT_BASE_CLASS = "flex min-w-0 flex-col overflow-hidd
|
|
|
7
7
|
export declare const CARD_PRESSABLE_ROOT_CLASS = "relative cursor-pointer focus-ring";
|
|
8
8
|
export declare const CARD_BUTTON_SHELL_CLASS = "w-full border-0 p-0 text-left";
|
|
9
9
|
export declare const CARD_PRESSABLE_CONTENT_CLASS = "relative flex min-w-0 flex-1 flex-col";
|
|
10
|
-
export declare const CARD_HEADER_CLASS = "flex shrink-0 flex-col gap-small py-plus px-
|
|
10
|
+
export declare const CARD_HEADER_CLASS = "flex shrink-0 flex-col gap-small py-plus px-mid text-left";
|
|
11
11
|
export declare const CARD_HEADING_BLOCK_CLASS = "flex min-w-0 flex-1 flex-col gap-xsmall text-left";
|
|
12
|
-
export declare const CARD_BODY_CLASS = "min-w-0 px-
|
|
12
|
+
export declare const CARD_BODY_CLASS = "min-w-0 px-mid pb-mid";
|
|
13
13
|
export declare const CARD_TITLE_CLASS = "min-w-0";
|
|
14
14
|
export declare const CARD_DESCRIPTION_CLASS = "min-w-0 text-muted";
|
|
15
|
-
export declare const CARD_FOOTER_CLASS = "mt-auto border-t-token py-plus px-
|
|
15
|
+
export declare const CARD_FOOTER_CLASS = "mt-auto border-t-token py-plus px-mid text-muted";
|
|
16
16
|
export declare function cardGlossPanelClass(className?: string): string;
|
|
17
17
|
export declare function cardGlossPressableClass(pressable: boolean): string;
|
|
18
18
|
export declare function cardRootClass(variant: Exclude<CardVariant, "gloss">, pressable: boolean, pressableMotionClass: string, className?: string): string;
|
|
@@ -12,7 +12,7 @@ export declare const DIALOG_GLOSS_PANEL_CLASS = "gloss-panel gloss-deep flex min
|
|
|
12
12
|
export declare const DIALOG_HEADER_CLASS = "flex shrink-0 items-start";
|
|
13
13
|
export declare const DIALOG_HEADING_BLOCK_CLASS = "min-w-0";
|
|
14
14
|
export declare const DIALOG_TITLE_CLASS = "min-w-0";
|
|
15
|
-
export declare const DIALOG_BODY_BASE_CLASS = "min-h-0 flex-1 overflow-y-auto";
|
|
15
|
+
export declare const DIALOG_BODY_BASE_CLASS = "min-h-0 flex-1 overflow-y-auto py-small";
|
|
16
16
|
export declare const DIALOG_FOOTER_CLASS = "flex shrink-0 flex-wrap items-center justify-end gap-base";
|
|
17
17
|
export declare const DIALOG_CLOSE_CLASS = "shrink-0";
|
|
18
18
|
export declare const DIALOG_GLOSS_CONTENT_CLASS = "gloss-content";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DrawerPlacement, DrawerSize, DrawerVariant } from './drawerTypes';
|
|
2
2
|
export declare const HANDLE_EDGE_PADDING_CLASS: Record<DrawerPlacement, string>;
|
|
3
3
|
export declare const DRAWER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col gap-mid text-left";
|
|
4
|
-
export declare const DRAWER_HEADER_PADDING = "px-mid pt-
|
|
5
|
-
export declare const DRAWER_BODY_PADDING = "px-mid";
|
|
6
|
-
export declare const DRAWER_FOOTER_PADDING = "px-mid pb-
|
|
4
|
+
export declare const DRAWER_HEADER_PADDING = "px-mid pt-plus";
|
|
5
|
+
export declare const DRAWER_BODY_PADDING = "px-mid py-base";
|
|
6
|
+
export declare const DRAWER_FOOTER_PADDING = "px-mid pb-plus";
|
|
7
7
|
export declare const DRAWER_NATIVE_CLASS = "fixed inset-0 z-[100] m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent";
|
|
8
8
|
export declare const DRAWER_OVERLAY_LIGHT_CLASS = "bg-[color-mix(in_oklab,var(--color-foreground)_14%,transparent)] backdrop-blur-[14px] backdrop-saturate-150 motion-reduce:backdrop-blur-none";
|
|
9
9
|
export declare const DRAWER_OVERLAY_DARK_CLASS = "bg-[color-mix(in_oklab,black_55%,transparent)]";
|
|
@@ -7,6 +7,7 @@ export declare const DropdownTrigger: import('react').ForwardRefExoticComponent<
|
|
|
7
7
|
export declare const DropdownPopover: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
8
8
|
variant?: import('../Popover').PopoverVariant;
|
|
9
9
|
bodyClassName?: string;
|
|
10
|
+
align?: import('../Popover').FloatingAlign;
|
|
10
11
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
12
|
export declare function DropdownGroup({ className, children, selectionIndicator, ...rest }: DropdownGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare namespace DropdownGroup {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { PopoverVariant } from '../Popover';
|
|
3
|
+
import { FloatingAlign } from '../Tooltip/tooltipPosition';
|
|
3
4
|
import { SelectionIndicatorClassNames, SelectionIndicatorSize, SelectionIndicatorVariant } from '../SelectionIndicator';
|
|
4
5
|
export type DropdownItemVariant = "default" | "danger" | "warning" | "info" | "success";
|
|
5
6
|
export type DropdownClassNames = {
|
|
@@ -71,6 +72,8 @@ export type DropdownTriggerProps = HTMLAttributes<HTMLElement> & {
|
|
|
71
72
|
export type DropdownPopoverProps = HTMLAttributes<HTMLDivElement> & {
|
|
72
73
|
variant?: PopoverVariant;
|
|
73
74
|
bodyClassName?: string;
|
|
75
|
+
/** Panel alignment relative to trigger (passed to Popover). Default: `start` when matching width. */
|
|
76
|
+
align?: FloatingAlign;
|
|
74
77
|
};
|
|
75
78
|
export type DropdownGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
76
79
|
selectionIndicator?: boolean;
|
|
@@ -6,10 +6,12 @@ export declare const Dropdown: typeof DropdownRoot & {
|
|
|
6
6
|
Popover: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
variant?: import('../Popover').PopoverVariant;
|
|
8
8
|
bodyClassName?: string;
|
|
9
|
+
align?: import('../Popover').FloatingAlign;
|
|
9
10
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
11
|
Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
11
12
|
variant?: import('../Popover').PopoverVariant;
|
|
12
13
|
bodyClassName?: string;
|
|
14
|
+
align?: import('../Popover').FloatingAlign;
|
|
13
15
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
16
|
Group: typeof DropdownGroup;
|
|
15
17
|
Label: typeof DropdownLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const PAGINATION_ROOT_CLASS = "flex w-full flex-wrap items-center justify-between gap-xsmall gap-y-xsmall text-left";
|
|
2
|
-
export declare const PAGINATION_SUMMARY_CLASS = "min-w-0 flex";
|
|
3
|
-
export declare const PAGINATION_SUMMARY_TEXT_CLASS = "text-muted";
|
|
4
|
-
export declare const PAGINATION_CONTENT_CLASS = "m-0 flex
|
|
5
|
-
export declare const PAGINATION_ITEM_CLASS = "flex items-center";
|
|
1
|
+
export declare const PAGINATION_ROOT_CLASS = "flex w-full min-w-0 flex-wrap items-center justify-between gap-xsmall gap-y-xsmall text-left";
|
|
2
|
+
export declare const PAGINATION_SUMMARY_CLASS = "flex min-w-0 flex-1 basis-[12rem]";
|
|
3
|
+
export declare const PAGINATION_SUMMARY_TEXT_CLASS = "min-w-0 truncate text-muted";
|
|
4
|
+
export declare const PAGINATION_CONTENT_CLASS = "m-0 ms-auto flex max-w-full min-w-0 list-none flex-wrap items-center justify-start gap-xsmall p-0";
|
|
5
|
+
export declare const PAGINATION_ITEM_CLASS = "flex shrink-0 items-center";
|
|
6
6
|
export declare const PAGINATION_INTERACTIVE_BUTTON_CLASS = "inline-flex min-w-0 origin-center cursor-pointer items-center justify-center gap-xsmall rounded-mid border-0 bg-transparent px-xsmall py-xsmall font-[inherit] text-muted no-underline outline-none hover:text-foreground focus-ring disabled:cursor-not-allowed disabled:opacity-48 disabled:hover:text-muted disabled:hover:bg-transparent motion-reduce:animate-none";
|
|
7
7
|
export declare const PAGINATION_PAGE_ACTIVE_CLASS = "inline-flex min-w-[1.75rem] items-center justify-center px-xsmall py-xsmall font-w-mid text-foreground tabular-nums text-base";
|
|
8
8
|
export declare const PAGINATION_PAGE_TEXT_CLASS = "min-w-[1.75rem] tabular-nums";
|
|
@@ -14,7 +14,7 @@ export declare const TABLE_COLUMN_LABEL_CLASS = "min-w-0 text-small text-left fo
|
|
|
14
14
|
export declare const TABLE_COLUMN_SORT_CHEVRON_BASE_CLASS = "shrink-0 origin-center";
|
|
15
15
|
export declare const TABLE_COLUMN_SORT_CHEVRON_ACTIVE_CLASS = "text-primary opacity-100";
|
|
16
16
|
export declare const TABLE_COLUMN_SORT_CHEVRON_IDLE_CLASS = "opacity-0 group-hover/col:opacity-40 text-muted";
|
|
17
|
-
export declare const TABLE_BODY_EMPTY_CELL_CLASS = "px-
|
|
17
|
+
export declare const TABLE_BODY_EMPTY_CELL_CLASS = "px-mid py-mid text-center";
|
|
18
18
|
export declare const TABLE_ROW_BASE_CLASS = "outline-none";
|
|
19
19
|
export declare const TABLE_ROW_VARIANT_CLASS: Record<TableVariant, string>;
|
|
20
20
|
export declare const TABLE_ROW_SELECTABLE_CLASS = "cursor-pointer";
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
+
/** Marks ToggleButton / Calendar cell fill for SSR CSS in `styles.css`. */
|
|
3
|
+
export declare const SELECTION_FILL_DATA_ATTR = "data-selection-fill";
|
|
4
|
+
/** Set by GSAP init — removes SSR hide rule so animations own visibility. */
|
|
5
|
+
export declare const SELECTION_FILL_READY_ATTR = "data-selection-fill-ready";
|
|
2
6
|
/**
|
|
3
7
|
* Fill for ToggleButton / CalendarInteractiveCell.
|
|
4
8
|
* Do not set `style={{ transform, opacity }}` on fill — React will overwrite GSAP on parent re-render.
|
|
9
|
+
* SSR: CSS hides via `[data-selection-fill]:not([data-selection-fill-ready])[data-pressed="false"]`.
|
|
5
10
|
*/
|
|
6
11
|
export declare function applyToggleButtonFillInstant(fill: HTMLElement, pressed: boolean): void;
|
|
7
12
|
export declare function createToggleButtonFillRefCallback(ref: RefObject<HTMLElement | null>, initialPressed: boolean): (node: HTMLElement | null) => void;
|