@epilot/volt-ui-experimental-griffel 0.2.0 → 0.2.3
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/AGENTS.md +153 -0
- package/AUTHORING.md +292 -0
- package/README.md +90 -7
- package/dist/components/alert-dialog/alert-dialog.js +18 -18
- package/dist/components/avatar/avatar.js +18 -19
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js +13 -13
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +6 -6
- package/dist/components/button/button.js +20 -20
- package/dist/components/button-group/button-group.js +6 -6
- package/dist/components/callout/callout.js +6 -6
- package/dist/components/card/card.js +8 -8
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js +4 -4
- package/dist/components/command/command.js +15 -15
- package/dist/components/data-table/data-table-column-header.js +5 -5
- package/dist/components/data-table/data-table-error.js +13 -13
- package/dist/components/data-table/data-table-loading.js +4 -4
- package/dist/components/date-range-picker/date-range-picker.js +8 -8
- package/dist/components/date-time-picker/calendar.js +15 -15
- package/dist/components/date-time-picker/date-time-picker-panel.js +73 -67
- package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker.js +53 -49
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -1
- package/dist/components/date-time-picker/time-picker.js +77 -71
- package/dist/components/date-time-picker/time-picker.js.map +1 -1
- package/dist/components/dialog/dialog.js +21 -21
- package/dist/components/drawer/drawer.js +16 -16
- package/dist/components/dropdown-menu/dropdown-menu.js +13 -13
- package/dist/components/field/field-combobox.js +9 -9
- package/dist/components/field/field.js +22 -22
- package/dist/components/label/label.js +11 -11
- package/dist/components/list/list.js +13 -13
- package/dist/components/option-card/option-card.js +24 -24
- package/dist/components/pill/pill.js +21 -20
- package/dist/components/pill/pill.js.map +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/radio/radio.js +8 -8
- package/dist/components/scroll-overflow/scroll-overflow.js +6 -6
- package/dist/components/select/select.js +25 -25
- package/dist/components/skeleton/skeleton.js +17 -17
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/table/table-pagination.js +74 -76
- package/dist/components/table/table-pagination.js.map +1 -1
- package/dist/components/tabs/tabs.js +19 -19
- package/dist/components/toast/toast.js +24 -24
- package/dist/components/toggle/toggle.js +17 -17
- package/dist/components/tooltip/tooltip.js +6 -6
- package/dist/index.d.ts +9200 -65
- package/dist/index.js +276 -273
- package/dist/index.js.map +1 -1
- package/dist/tokens/core.generated.js +1168 -1154
- package/dist/tokens/core.generated.js.map +1 -1
- package/dist/tokens/index.d.ts +1079 -1053
- package/dist/tokens/index.js +1078 -1056
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/install.js +21 -9
- package/dist/tokens/install.js.map +1 -1
- package/dist/tokens/palette.generated.js +1323 -1293
- package/dist/tokens/palette.generated.js.map +1 -1
- package/dist/tokens.json +45 -1
- package/package.json +12 -5
- package/testing/jest-preset.cjs +64 -0
- package/dist/components/accordion/accordion.d.ts +0 -14
- package/dist/components/alert-dialog/alert-dialog.d.ts +0 -36
- package/dist/components/avatar/avatar-group.d.ts +0 -7
- package/dist/components/avatar/avatar.d.ts +0 -17
- package/dist/components/badge/badge.d.ts +0 -41
- package/dist/components/breadcrumb/breadcrumb.d.ts +0 -37
- package/dist/components/button/button.d.ts +0 -18
- package/dist/components/button-group/button-group.d.ts +0 -30
- package/dist/components/callout/callout.d.ts +0 -23
- package/dist/components/card/card.d.ts +0 -9
- package/dist/components/checkbox/checkbox.d.ts +0 -4
- package/dist/components/collapsible-sidebar/collapsible-sidebar.d.ts +0 -33
- package/dist/components/command/command.d.ts +0 -85
- package/dist/components/data-table/data-table-body.d.ts +0 -21
- package/dist/components/data-table/data-table-column-header.d.ts +0 -13
- package/dist/components/data-table/data-table-column-visibility.d.ts +0 -21
- package/dist/components/data-table/data-table-content.d.ts +0 -13
- package/dist/components/data-table/data-table-context.d.ts +0 -66
- package/dist/components/data-table/data-table-error.d.ts +0 -21
- package/dist/components/data-table/data-table-header.d.ts +0 -14
- package/dist/components/data-table/data-table-loading.d.ts +0 -13
- package/dist/components/data-table/data-table-pagination.d.ts +0 -17
- package/dist/components/data-table/data-table-pinning-utils.d.ts +0 -17
- package/dist/components/data-table/data-table-row.d.ts +0 -14
- package/dist/components/data-table/data-table-toolbar.d.ts +0 -7
- package/dist/components/data-table/data-table.d.ts +0 -92
- package/dist/components/data-table/get-selected-row-data.d.ts +0 -18
- package/dist/components/data-table/hooks/index.d.ts +0 -2
- package/dist/components/data-table/hooks/use-data-table-content.d.ts +0 -1
- package/dist/components/data-table/hooks/use-data-table.d.ts +0 -2
- package/dist/components/date-range-picker/date-range-picker-utils.d.ts +0 -2
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -34
- package/dist/components/date-range-picker/range-calendar.d.ts +0 -15
- package/dist/components/date-time-picker/calendar.d.ts +0 -28
- package/dist/components/date-time-picker/date-time-picker-context.d.ts +0 -39
- package/dist/components/date-time-picker/date-time-picker-input.d.ts +0 -13
- package/dist/components/date-time-picker/date-time-picker-panel.d.ts +0 -15
- package/dist/components/date-time-picker/date-time-picker-popover.d.ts +0 -6
- package/dist/components/date-time-picker/date-time-picker-utils.d.ts +0 -37
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -47
- package/dist/components/date-time-picker/time-picker.d.ts +0 -12
- package/dist/components/dialog/dialog.d.ts +0 -27
- package/dist/components/drawer/drawer.d.ts +0 -27
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +0 -41
- package/dist/components/field/field-combobox.d.ts +0 -90
- package/dist/components/field/field-select.d.ts +0 -4
- package/dist/components/field/field.d.ts +0 -76
- package/dist/components/label/label.d.ts +0 -21
- package/dist/components/list/list.d.ts +0 -46
- package/dist/components/option-card/option-card.d.ts +0 -39
- package/dist/components/pill/pill.d.ts +0 -27
- package/dist/components/popover/popover.d.ts +0 -14
- package/dist/components/radio/radio.d.ts +0 -6
- package/dist/components/scroll-overflow/scroll-overflow.d.ts +0 -38
- package/dist/components/segmented-control/segmented-control.d.ts +0 -11
- package/dist/components/select/select.d.ts +0 -26
- package/dist/components/separator/separator.d.ts +0 -30
- package/dist/components/skeleton/skeleton.d.ts +0 -24
- package/dist/components/spinner/spinner.d.ts +0 -25
- package/dist/components/switch/switch.d.ts +0 -17
- package/dist/components/table/table-pagination.d.ts +0 -45
- package/dist/components/table/table.d.ts +0 -50
- package/dist/components/tabs/tabs.d.ts +0 -18
- package/dist/components/text/text.d.ts +0 -22
- package/dist/components/toast/toast.d.ts +0 -10
- package/dist/components/toggle/toggle-group.d.ts +0 -10
- package/dist/components/toggle/toggle.d.ts +0 -10
- package/dist/components/tooltip/tooltip.d.ts +0 -15
- package/dist/lib/clear-button.d.ts +0 -5
- package/dist/lib/icons.d.ts +0 -3
- package/dist/lib/pagination.d.ts +0 -71
- package/dist/renderer/contract.d.ts +0 -12
- package/dist/renderer/index.d.ts +0 -10
- package/dist/styles/make-styles.d.ts +0 -37
- package/dist/tokens/core.generated.d.ts +0 -3
- package/dist/tokens/install.d.ts +0 -38
- package/dist/tokens/palette.generated.d.ts +0 -3
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Pill — same colour-matrix collapse as Badge, plus a hover background.
|
|
4
|
-
*
|
|
5
|
-
* v1 enumerates 19 colours x 3 styles as 57 `compoundVariants`, each a distinct class string
|
|
6
|
-
* built by interpolation (`volt-bg-${color}-soft`), which Tailwind's scanner cannot see and
|
|
7
|
-
* `safelist.css` exists to force into existence. The hover state made that 57 more per-colour
|
|
8
|
-
* rules. Here the colour is a VALUE, not part of a class name: the four atoms below read four
|
|
9
|
-
* custom properties, the component sets those inline from the `color` prop, and a single `:hover`
|
|
10
|
-
* atom reads the hover background. Total rules: one small set per style variant — 9 colours' worth
|
|
11
|
-
* of rules cover all 19 x 3 combinations.
|
|
12
|
-
*/
|
|
13
|
-
declare const COLORS: readonly ["blue", "sky", "mint", "lime", "green", "teal", "cyan", "indigo", "purple", "pink", "red", "orange", "yellow", "bronze", "gray", "accent", "warning", "success", "error"];
|
|
14
|
-
export type PillColor = (typeof COLORS)[number];
|
|
15
|
-
export type PillVariant = "soft" | "solid" | "surface";
|
|
16
|
-
export type PillProps = Omit<React.ComponentProps<"span">, "color"> & {
|
|
17
|
-
color?: PillColor;
|
|
18
|
-
/**
|
|
19
|
-
* Named `variant`, not `style`. v1 called this `style`, which shadows the HTML `style` attribute.
|
|
20
|
-
* Retrocompat is not a requirement here, so the collision is fixed rather than inherited.
|
|
21
|
-
*/
|
|
22
|
-
variant?: PillVariant;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
25
|
-
};
|
|
26
|
-
export declare const Pill: React.ForwardRefExoticComponent<Omit<PillProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
27
|
-
export { COLORS as PILL_COLORS };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
-
export type PopoverProps = React.ComponentProps<typeof PopoverPrimitive.Root>;
|
|
4
|
-
export declare const Popover: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
-
export type PopoverTriggerProps = React.ComponentProps<typeof PopoverPrimitive.Trigger>;
|
|
6
|
-
export declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
export type PopoverPortalProps = React.ComponentProps<typeof PopoverPrimitive.Portal>;
|
|
8
|
-
export declare const PopoverPortal: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverPortalProps & React.RefAttributes<HTMLElement>>;
|
|
9
|
-
export type PopoverAnchorProps = React.ComponentProps<typeof PopoverPrimitive.Anchor>;
|
|
10
|
-
export declare const PopoverAnchor: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export type PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
12
|
-
flush?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
-
export type RadioGroupProps = React.ComponentProps<typeof RadioGroupPrimitive.Root>;
|
|
4
|
-
export declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export type RadioGroupItemProps = React.ComponentProps<typeof RadioGroupPrimitive.Item>;
|
|
6
|
-
export declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3
|
-
export type UseScrollOverflowOptions = {
|
|
4
|
-
/** Scroll distance per step in pixels. Default: 200 */
|
|
5
|
-
scrollStep?: number;
|
|
6
|
-
/** Scroll orientation. Default: "horizontal" */
|
|
7
|
-
orientation?: "horizontal" | "vertical";
|
|
8
|
-
};
|
|
9
|
-
export type UseScrollOverflowReturn = {
|
|
10
|
-
/** Ref to attach to the scroll container (Base UI Viewport) */
|
|
11
|
-
scrollRef: React.RefObject<HTMLDivElement | null>;
|
|
12
|
-
/** Whether the content overflows the container */
|
|
13
|
-
hasOverflow: boolean;
|
|
14
|
-
/** Whether there is hidden content before the visible area (left or top) */
|
|
15
|
-
canScrollStart: boolean;
|
|
16
|
-
/** Whether there is hidden content after the visible area (right or bottom) */
|
|
17
|
-
canScrollEnd: boolean;
|
|
18
|
-
/** Scroll toward the start (left or up) by scrollStep */
|
|
19
|
-
scrollToStart: () => void;
|
|
20
|
-
/** Scroll toward the end (right or down) by scrollStep */
|
|
21
|
-
scrollToEnd: () => void;
|
|
22
|
-
};
|
|
23
|
-
export declare function useScrollOverflow(options?: UseScrollOverflowOptions): UseScrollOverflowReturn;
|
|
24
|
-
export type ScrollOverflowProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root> & UseScrollOverflowOptions & {
|
|
25
|
-
/** Show navigation arrow buttons on edges. Default: false */
|
|
26
|
-
arrows?: boolean;
|
|
27
|
-
/** Show gradient fade indicators on edges. Default: true */
|
|
28
|
-
gradients?: boolean;
|
|
29
|
-
/** Gradient width in pixels. Default: 40 */
|
|
30
|
-
gradientWidth?: number;
|
|
31
|
-
/** Gradient base color (CSS value). Should match the parent background. Default: "var(--volt-body)" */
|
|
32
|
-
gradientColor?: string;
|
|
33
|
-
/** Show inset shadow on overflow edges. Default: true */
|
|
34
|
-
shadow?: boolean;
|
|
35
|
-
/** Show a styled scrollbar track. Default: false */
|
|
36
|
-
scrollbar?: boolean;
|
|
37
|
-
};
|
|
38
|
-
export declare const ScrollOverflow: React.ForwardRefExoticComponent<Omit<ScrollOverflowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
-
export type SegmentedControlLayout = "hug" | "equal" | "stretch";
|
|
4
|
-
export type SegmentedControlProps = React.ComponentProps<typeof RadioGroupPrimitive.Root> & {
|
|
5
|
-
layout?: SegmentedControlLayout;
|
|
6
|
-
};
|
|
7
|
-
export type SegmentedControlItemProps = React.ComponentProps<typeof RadioGroupPrimitive.Item> & {
|
|
8
|
-
icon?: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export declare const SegmentedControl: React.ForwardRefExoticComponent<Omit<SegmentedControlProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export declare const SegmentedControlItem: React.ForwardRefExoticComponent<Omit<SegmentedControlItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
-
export type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>;
|
|
4
|
-
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
-
export type SelectGroupProps = React.ComponentProps<typeof SelectPrimitive.Group>;
|
|
6
|
-
export declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export type SelectValueProps = React.ComponentProps<typeof SelectPrimitive.Value>;
|
|
8
|
-
export declare const SelectValue: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
-
export type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger>;
|
|
10
|
-
export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export type SelectTriggerClearProps = React.ComponentProps<"span">;
|
|
12
|
-
export declare const SelectTriggerClear: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
13
|
-
export type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content> & {
|
|
14
|
-
container?: React.ComponentProps<typeof SelectPrimitive.Portal>["container"];
|
|
15
|
-
};
|
|
16
|
-
export declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
export type SelectLabelProps = React.ComponentProps<typeof SelectPrimitive.Label>;
|
|
18
|
-
export declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
export type SelectItemProps = React.ComponentProps<typeof SelectPrimitive.Item>;
|
|
20
|
-
export declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export type SelectSeparatorProps = React.ComponentProps<typeof SelectPrimitive.Separator>;
|
|
22
|
-
export declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>;
|
|
24
|
-
export declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
-
export type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>;
|
|
26
|
-
export declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Separator — v1's `@radix-ui/react-separator` ported to Griffel atoms with no Radix dependency.
|
|
4
|
-
*
|
|
5
|
-
* A separator needs no behaviour beyond correct semantics, so it is a plain `<div>`. The two
|
|
6
|
-
* orientation variants are separate style slots selected in JS from the `orientation` prop — we
|
|
7
|
-
* deliberately do NOT style off a `data-[orientation=...]` attribute, like v1 does. v1 keyed its
|
|
8
|
-
* sizing on `data-[orientation=horizontal]`; doing that here would either key on `data-slot`-style
|
|
9
|
-
* selectors (whose values are shared with v1, so the rule also matches v1-rendered DOM) or on the
|
|
10
|
-
* custom-property slot marker. Two slots in the style object is simpler and cheaper. We still emit
|
|
11
|
-
* `data-orientation` as a plain attribute — for diagnostics and for consumers — we just never style
|
|
12
|
-
* off it.
|
|
13
|
-
*
|
|
14
|
-
* The accessibility surface is the whole point of the component, so it gets the full treatment:
|
|
15
|
-
* - `decorative` (default `true`): the divider is purely presentational, so it is hidden from
|
|
16
|
-
* assistive technology with `aria-hidden="true"` and carries no `role`.
|
|
17
|
-
* - `decorative={false}`: a meaningful separator, so it gets `role="separator"` and
|
|
18
|
-
* `aria-orientation` matching the `orientation` prop.
|
|
19
|
-
*/
|
|
20
|
-
export type SeparatorOrientation = "horizontal" | "vertical";
|
|
21
|
-
export type SeparatorProps = React.ComponentProps<"div"> & {
|
|
22
|
-
orientation?: SeparatorOrientation;
|
|
23
|
-
/**
|
|
24
|
-
* When `true` the separator is purely decorative and is hidden from assistive technology
|
|
25
|
-
* (`aria-hidden="true"`, no `role`). When `false` it is a meaningful separator and gets
|
|
26
|
-
* `role="separator"` plus `aria-orientation`.
|
|
27
|
-
*/
|
|
28
|
-
decorative?: boolean;
|
|
29
|
-
};
|
|
30
|
-
export declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Skeleton — v1's loading placeholder ported to Griffel atoms.
|
|
4
|
-
*
|
|
5
|
-
* Two variants, `default` and `ai`. `default` is a gray block that pulses; `ai` is a gray field
|
|
6
|
-
* that renders three decorative colour spots drifting behind the content. The spots are ported from
|
|
7
|
-
* v1's global `skeleton-ai-spot-*` classes in `styles/utilities.css`, including their exact
|
|
8
|
-
* gradients, durations (10s / 12s / 14s) and easing.
|
|
9
|
-
*
|
|
10
|
-
* The keyframes are the object form, so Griffel hashes each one from its content — a hand-authored
|
|
11
|
-
* global `@keyframes` would collide across two co-resident copies of this package. The pulse is a
|
|
12
|
-
* single three-stop animation; each spot carries its own.
|
|
13
|
-
*
|
|
14
|
-
* The spots are `purple-a4`, `pink-a4` and `indigo-a4`, none of which is a core token family
|
|
15
|
-
* (accent / gray / error / warning / success / info ship in the core sheet; everything else lives
|
|
16
|
-
* in the palette sheet, which is not loaded by default). `ai` therefore calls
|
|
17
|
-
* `ensurePaletteTokens()` — CONVENTIONS rule 3. There is no `color` prop, so no inline custom
|
|
18
|
-
* properties: the spot colours are constant and live inside the style objects.
|
|
19
|
-
*/
|
|
20
|
-
export type SkeletonVariant = "default" | "ai";
|
|
21
|
-
export type SkeletonProps = React.ComponentProps<"div"> & {
|
|
22
|
-
variant?: SkeletonVariant;
|
|
23
|
-
};
|
|
24
|
-
export declare const Skeleton: React.ForwardRefExoticComponent<Omit<SkeletonProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Spinner — v1's SVG spinner ported to a size-driven style object.
|
|
4
|
-
*
|
|
5
|
-
* v1 sizes this with Tailwind `size-*` utilities and deprecated the `size` prop in favour of a
|
|
6
|
-
* `className` like `size-4`. There is no Tailwind here, so that escape hatch does not exist: `size`
|
|
7
|
-
* is the supported API and the `@deprecated` tag is dropped (CONVENTIONS rule 9).
|
|
8
|
-
*
|
|
9
|
-
* The SVG markup, `viewBox` and stroke attributes are copied exactly from v1. Both animations are
|
|
10
|
-
* the object form per CONVENTIONS rule 8: the outer `<g>` spins from a single `100%` stop, and the
|
|
11
|
-
* dash sweep carries all three of v1's keyframe stops (`0%`, `47.5%`, `95%,100%`) from
|
|
12
|
-
* `styles/animations.css`. The only mechanical changes are stylistic: sizes become width/height
|
|
13
|
-
* atoms and the two `animate-*` classes become `animationName` + duration + timing + iteration.
|
|
14
|
-
*
|
|
15
|
-
* The five dimensions (1rem / 1.5rem / 2.5rem / 4rem / 6rem) are v1's Tailwind `size-N` values;
|
|
16
|
-
* the v2 token set has no size or width/height family, so they are literals (CONVENTIONS rule 1).
|
|
17
|
-
*
|
|
18
|
-
* v1 also exposes a `variant` prop (`circle` | `line`) whose branches are both empty strings — it
|
|
19
|
-
* produces no styles at all, so it is omitted here.
|
|
20
|
-
*/
|
|
21
|
-
export type SpinnerSize = "sm" | "base" | "lg" | "xl" | "2xl";
|
|
22
|
-
export type SpinnerProps = React.ComponentProps<"svg"> & {
|
|
23
|
-
size?: SpinnerSize;
|
|
24
|
-
};
|
|
25
|
-
export declare const Spinner: React.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
3
|
-
/**
|
|
4
|
-
* `primary` is a deprecated alias of `default`, carried because v1 has it and real consumers still
|
|
5
|
-
* pass it — entity-sidepanel's SettingsControls does. v1's own comment marks it deprecated and its
|
|
6
|
-
* styles are byte-identical to `default`, so it is mapped rather than duplicated.
|
|
7
|
-
*
|
|
8
|
-
* @remarks `primary` is deprecated; use `default`.
|
|
9
|
-
*/
|
|
10
|
-
export type SwitchVariant = "default" | "destructive" | "primary";
|
|
11
|
-
export type SwitchSize = "sm" | "base" | "lg";
|
|
12
|
-
export type SwitchProps = React.ComponentProps<typeof SwitchPrimitive.Root> & {
|
|
13
|
-
variant?: SwitchVariant;
|
|
14
|
-
size?: SwitchSize;
|
|
15
|
-
showThumbIcon?: boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ComponentProps } from "react";
|
|
3
|
-
export type TablePaginationLabels = {
|
|
4
|
-
/** Label for the pagination navigation region. */
|
|
5
|
-
navigation?: string;
|
|
6
|
-
/** Label for first page button. */
|
|
7
|
-
firstPage?: string;
|
|
8
|
-
/** Label for previous page button. */
|
|
9
|
-
previousPage?: string;
|
|
10
|
-
/** Label for next page button. */
|
|
11
|
-
nextPage?: string;
|
|
12
|
-
/** Label for last page button. */
|
|
13
|
-
lastPage?: string;
|
|
14
|
-
/** Label generator for page number buttons. Receives 1-indexed page number. */
|
|
15
|
-
goToPage?: (page: number) => string;
|
|
16
|
-
/** Label generator for ellipsis jump buttons. Receives target page number. */
|
|
17
|
-
jumpToPage?: (page: number) => string;
|
|
18
|
-
/** Label generator for page size selector. Receives current page size. */
|
|
19
|
-
pageSizeSelector?: (pageSize: number) => string;
|
|
20
|
-
/** Label for page size dropdown header. */
|
|
21
|
-
resultsPerPage?: string;
|
|
22
|
-
/** Label generator for the range display. Receives start, end, and total. */
|
|
23
|
-
rangeDisplay?: (start: number, end: number, total: number) => string;
|
|
24
|
-
};
|
|
25
|
-
export type TablePaginationProps = Omit<ComponentProps<"div">, "onChange"> & {
|
|
26
|
-
/** Current page number (1-indexed) */
|
|
27
|
-
page: number;
|
|
28
|
-
/** Total number of items across all pages */
|
|
29
|
-
totalItems: number;
|
|
30
|
-
/** Current page size (items per page) */
|
|
31
|
-
pageSize: number;
|
|
32
|
-
/** Callback fired when the page changes */
|
|
33
|
-
onPageChange: (page: number) => void;
|
|
34
|
-
/** Callback fired when the page size changes */
|
|
35
|
-
onPageSizeChange: (pageSize: number) => void;
|
|
36
|
-
/** Available page size options for the dropdown */
|
|
37
|
-
pageSizeOptions?: number[];
|
|
38
|
-
/** Number of sibling pages to show on each side of current page */
|
|
39
|
-
siblingCount?: number;
|
|
40
|
-
/** Whether the pagination controls are disabled */
|
|
41
|
-
disabled?: boolean;
|
|
42
|
-
/** Labels for i18n. All labels are optional for backwards compatibility but recommended. */
|
|
43
|
-
labels?: TablePaginationLabels;
|
|
44
|
-
};
|
|
45
|
-
export declare const TablePagination: React.ForwardRefExoticComponent<Omit<TablePaginationProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Table — the primitive set (Table, TableHeader, TableBody, TableFooter, TableRow, TableHead,
|
|
4
|
-
* TableCell, TableCaption) in Card's compound pattern: one `makeVoltStyles` call, one slot per
|
|
5
|
-
* sub-component, each reading its own slot.
|
|
6
|
-
*
|
|
7
|
-
* v1 ships a density dimension through React context, defaulting to `normal`; TableHead and
|
|
8
|
-
* TableCell each resolve `effectiveDensity = density ?? contextDensity`, and that drives a height
|
|
9
|
-
* (head) or a vertical padding (cell) slot. Selectors carry over untouched where they do not
|
|
10
|
-
* involve `data-slot`: `[&_tr]:border-b`, `[&_tr:last-child]:border-0`,
|
|
11
|
-
* `data-[state=selected]:bg-accent-a3` (Radix selection state) and the `role="checkbox"`
|
|
12
|
-
* column-reflow rules all obey the original attribute.
|
|
13
|
-
*
|
|
14
|
-
* Values explicit where no token exists: `px-3` (0.75rem) on head/cell, the `h-9` / `h-10`
|
|
15
|
-
* heights (2.25rem / 2.5rem), `py-1.5` (0.375rem) and `py-3` (0.75rem) cell paddings. The row's
|
|
16
|
-
* `transition-colors` expands to Tailwind v4's default property list plus the 150ms
|
|
17
|
-
* `cubic-bezier(0.4, 0, 0.2, 1)` easing — visible motion from the framework's default theme,
|
|
18
|
-
* which the v1 file does not state (Rule 0: flagged, not approximated away). The checkbox
|
|
19
|
-
* `translate-y-[2px]` maps to the modern `translate` property, which is what Tailwind v4 emits.
|
|
20
|
-
*/
|
|
21
|
-
export type TableDensity = "compact" | "normal" | "comfortable";
|
|
22
|
-
declare const TableDensityContext: React.Context<TableDensity>;
|
|
23
|
-
export type TableProps = React.ComponentProps<"table"> & {
|
|
24
|
-
density?: TableDensity;
|
|
25
|
-
};
|
|
26
|
-
export declare const Table: React.ForwardRefExoticComponent<Omit<TableProps, "ref"> & React.RefAttributes<HTMLTableElement>>;
|
|
27
|
-
export declare const TableHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
28
|
-
export declare const TableBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
29
|
-
export declare const TableFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
30
|
-
export type TableRowProps = React.ComponentProps<"tr"> & {
|
|
31
|
-
/** Disable hover background effect */
|
|
32
|
-
noHover?: boolean;
|
|
33
|
-
};
|
|
34
|
-
export declare const TableRow: React.ForwardRefExoticComponent<Omit<TableRowProps, "ref"> & React.RefAttributes<HTMLTableRowElement>>;
|
|
35
|
-
export type TableHeadProps = React.ComponentProps<"th"> & {
|
|
36
|
-
align?: "left" | "center" | "right";
|
|
37
|
-
density?: TableDensity;
|
|
38
|
-
};
|
|
39
|
-
export declare const TableHead: React.ForwardRefExoticComponent<Omit<TableHeadProps, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
40
|
-
export type TableCellProps = React.ComponentProps<"td"> & {
|
|
41
|
-
align?: "left" | "center" | "right";
|
|
42
|
-
numeric?: boolean;
|
|
43
|
-
density?: TableDensity;
|
|
44
|
-
};
|
|
45
|
-
export declare const TableCell: React.ForwardRefExoticComponent<Omit<TableCellProps, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
46
|
-
export type TableCaptionProps = React.ComponentProps<"caption"> & {
|
|
47
|
-
position?: "top" | "bottom";
|
|
48
|
-
};
|
|
49
|
-
export declare const TableCaption: React.ForwardRefExoticComponent<Omit<TableCaptionProps, "ref"> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
50
|
-
export { TableDensityContext };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
-
export type TabsSize = "sm" | "base" | "lg";
|
|
4
|
-
export type TabsRootVariant = "default" | "highlight";
|
|
5
|
-
export type TabsTriggerVariant = "default" | "destructive";
|
|
6
|
-
export type TabsProps = React.ComponentProps<typeof TabsPrimitive.Root> & {
|
|
7
|
-
size?: TabsSize;
|
|
8
|
-
variant?: TabsRootVariant;
|
|
9
|
-
};
|
|
10
|
-
export declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export type TabsListProps = React.ComponentProps<typeof TabsPrimitive.List>;
|
|
12
|
-
export declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export type TabsTriggerProps = React.ComponentProps<typeof TabsPrimitive.Trigger> & {
|
|
14
|
-
variant?: TabsTriggerVariant;
|
|
15
|
-
};
|
|
16
|
-
export declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
-
export type TabsContentProps = React.ComponentProps<typeof TabsPrimitive.Content>;
|
|
18
|
-
export declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Text — the v1 text scale ported to Griffel atoms.
|
|
4
|
-
*
|
|
5
|
-
* v1 expressed the ten variants as cva classes (`text-3xl tracking-tighter font-bold` etc.), one
|
|
6
|
-
* per variant. Here each variant is a small set of atoms that read design tokens instead of
|
|
7
|
-
* literal values; the variant itself is the whole style, so there is exactly one slot per variant
|
|
8
|
-
* and the caller's `className` is merged on top.
|
|
9
|
-
*
|
|
10
|
-
* Unlike Badge there is no `color` prop, so no palette install and no inline custom properties:
|
|
11
|
-
* the only colour used (the helper variants) is `gray-a11`, a core token that ships in the core
|
|
12
|
-
* sheet.
|
|
13
|
-
*
|
|
14
|
-
* Body and helper variants keep v1's `display: inline-block` — it lets inline text size to its
|
|
15
|
-
* content inside flex/grid parents instead of collapsing to zero width. Titles and headings
|
|
16
|
-
* inherit their display, exactly as v1.
|
|
17
|
-
*/
|
|
18
|
-
export type TextVariant = "title3" | "title2" | "title1" | "heading3" | "heading2" | "heading1" | "body2" | "body1" | "helper2" | "helper1";
|
|
19
|
-
export type TextProps = React.ComponentProps<"span"> & {
|
|
20
|
-
variant?: TextVariant;
|
|
21
|
-
};
|
|
22
|
-
export declare const Text: React.ForwardRefExoticComponent<Omit<TextProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as Sonner from "sonner";
|
|
3
|
-
export type ToasterProps = Sonner.ToasterProps & {
|
|
4
|
-
theme?: "light" | "dark";
|
|
5
|
-
};
|
|
6
|
-
export declare const Toaster: React.ForwardRefExoticComponent<Sonner.ToasterProps & {
|
|
7
|
-
theme?: "light" | "dark";
|
|
8
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
9
|
-
export type ToastOptions = Parameters<typeof Sonner.toast>[1];
|
|
10
|
-
export { toast } from "sonner";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3
|
-
import { type ToggleVariant, type ToggleSize } from "./toggle";
|
|
4
|
-
export type ToggleGroupProps = React.ComponentProps<typeof ToggleGroupPrimitive.Root>;
|
|
5
|
-
export declare const ToggleGroup: React.ForwardRefExoticComponent<(Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export type ToggleGroupItemProps = React.ComponentProps<typeof ToggleGroupPrimitive.Item> & {
|
|
7
|
-
variant?: ToggleVariant;
|
|
8
|
-
size?: ToggleSize;
|
|
9
|
-
};
|
|
10
|
-
export declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
|
-
export type ToggleVariant = "default" | "destructive";
|
|
4
|
-
export type ToggleSize = "sm" | "base" | "lg";
|
|
5
|
-
export declare const useToggleStyles: () => Record<"sm" | "base" | "lg" | "default" | "root" | "destructive", string>;
|
|
6
|
-
export type ToggleProps = React.ComponentProps<typeof TogglePrimitive.Root> & {
|
|
7
|
-
variant?: ToggleVariant;
|
|
8
|
-
size?: ToggleSize;
|
|
9
|
-
};
|
|
10
|
-
export declare const Toggle: React.ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
-
export type TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>;
|
|
4
|
-
export declare const TooltipProvider: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipProviderProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
-
export type TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;
|
|
6
|
-
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipProps & React.RefAttributes<HTMLElement>>;
|
|
7
|
-
export type TooltipTriggerProps = React.ComponentProps<typeof TooltipPrimitive.Trigger>;
|
|
8
|
-
export declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
export type TooltipPortalProps = React.ComponentProps<typeof TooltipPrimitive.Portal>;
|
|
10
|
-
export declare const TooltipPortal: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipPortalProps & React.RefAttributes<HTMLElement>>;
|
|
11
|
-
export type TooltipContentProps = React.ComponentProps<typeof TooltipPrimitive.Content> & {
|
|
12
|
-
hideArrow?: boolean;
|
|
13
|
-
variant?: "default" | "destructive";
|
|
14
|
-
};
|
|
15
|
-
export declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/lib/icons.d.ts
DELETED
package/dist/lib/pagination.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pagination utility functions for calculating pagination metadata.
|
|
3
|
-
*/
|
|
4
|
-
export type PaginationParams = {
|
|
5
|
-
page: number;
|
|
6
|
-
pageSize: number;
|
|
7
|
-
totalItems: number;
|
|
8
|
-
};
|
|
9
|
-
export type PaginationMeta = {
|
|
10
|
-
/** Total number of pages */
|
|
11
|
-
totalPages: number;
|
|
12
|
-
/** First item index on current page (1-indexed for display) */
|
|
13
|
-
start: number;
|
|
14
|
-
/** Last item index on current page (1-indexed for display) */
|
|
15
|
-
end: number;
|
|
16
|
-
/** Whether there is a next page */
|
|
17
|
-
hasNextPage: boolean;
|
|
18
|
-
/** Whether there is a previous page */
|
|
19
|
-
hasPreviousPage: boolean;
|
|
20
|
-
/** Whether current page is the first page */
|
|
21
|
-
isFirstPage: boolean;
|
|
22
|
-
/** Whether current page is the last page */
|
|
23
|
-
isLastPage: boolean;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Calculate pagination metadata from current state.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* const meta = calculatePagination({ page: 1, pageSize: 10, totalItems: 25 })
|
|
31
|
-
* // Returns: { totalPages: 3, start: 1, end: 10, hasNextPage: true, ... }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function calculatePagination(params: PaginationParams): PaginationMeta;
|
|
35
|
-
/**
|
|
36
|
-
* Clamp a page number to valid bounds.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```tsx
|
|
40
|
-
* clampPage(5, 3) // Returns 3 (clamped to max)
|
|
41
|
-
* clampPage(0, 3) // Returns 1 (clamped to min)
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare function clampPage(page: number, totalPages: number): number;
|
|
45
|
-
/** Represents a page number or an ellipsis marker in pagination */
|
|
46
|
-
export type PageItem = {
|
|
47
|
-
type: "page";
|
|
48
|
-
page: number;
|
|
49
|
-
} | {
|
|
50
|
-
type: "ellipsis";
|
|
51
|
-
targetPage: number;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Generate page numbers with ellipsis for pagination UI.
|
|
55
|
-
*
|
|
56
|
-
* Pattern rules:
|
|
57
|
-
* - Fixed slot count: always shows TOTAL_SLOTS items (default: 7)
|
|
58
|
-
* - Right ellipsis when not near end: [pages..., ..., lastPage]
|
|
59
|
-
* - Near end: expanded window with no ellipsis
|
|
60
|
-
* - Ellipsis is clickable and jumps to midpoint
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```tsx
|
|
64
|
-
* getPageNumbers(1, 10) // [1, 2, 3, 4, 5, ellipsis→7, 10] (7 items)
|
|
65
|
-
* getPageNumbers(5, 10) // [3, 4, 5, 6, 7, ellipsis→8, 10] (7 items)
|
|
66
|
-
* getPageNumbers(7, 10) // [4, 5, 6, 7, 8, 9, 10] (7 items - expanded)
|
|
67
|
-
* getPageNumbers(10, 10) // [4, 5, 6, 7, 8, 9, 10] (7 items - expanded)
|
|
68
|
-
* getPageNumbers(2, 5) // [1, 2, 3, 4, 5] (5 items - small table)
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare function getPageNumbers(currentPage: number, totalPages: number, siblingCount?: number): PageItem[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The runtime's DOM contract, re-exported at the path components already import it from.
|
|
3
|
-
*
|
|
4
|
-
* A shim rather than 100 rewritten import lines. It also states the boundary in the one place a
|
|
5
|
-
* reader would look for it: these attribute names are the runtime's, not this package's, because
|
|
6
|
-
* they identify elements the runtime creates and every co-resident copy has to agree on them.
|
|
7
|
-
*
|
|
8
|
-
* `SLOT_ATTR` is the one components actually use. It exists because `data-slot` values are shared
|
|
9
|
-
* with v1 by design, so any selector keyed on one also matches v1-rendered DOM — including a v1
|
|
10
|
-
* element nested inside a v2 component. Every internal descendant selector keys on this instead.
|
|
11
|
-
*/
|
|
12
|
-
export { GRIFFEL_CLASS_SALT, GRIFFEL_VERSION, SLOT_ATTR, OWNER_ATTR, TOKENS_ATTR, INSERTION_POINT_ATTR, BUCKET_ATTR, PRIORITY_ATTR, CONTAINER_ATTR, } from "@epilot/volt-ui-runtime";
|
package/dist/renderer/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shared renderer, re-exported at the path this package's tests already import it from.
|
|
3
|
-
*
|
|
4
|
-
* The implementation is in `@epilot/volt-ui-runtime`, because the renderer instance is the thing
|
|
5
|
-
* every co-resident copy must agree on — one `createDOMRenderer`, resolved from
|
|
6
|
-
* `Symbol.for('@epilot/volt2-renderer:<salt>')`, so `renderer.insertionCache` dedups across copies
|
|
7
|
-
* without this package reimplementing anything.
|
|
8
|
-
*/
|
|
9
|
-
export { getVoltRenderer, getRendererInfo, __resetRendererForTests, assertAnchorIsFirstInHead, } from "@epilot/volt-ui-runtime";
|
|
10
|
-
export type { RendererInfo } from "@epilot/volt-ui-runtime";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { type GriffelResetStyle, type GriffelStyle } from "@epilot/volt-ui-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* The runtime's style hooks, with this package's token sheet attached.
|
|
4
|
-
*
|
|
5
|
-
* WHY THIS WRAPPER EXISTS, AND WHY IT IS NOT IN THE RUNTIME. Token installation used to sit inside
|
|
6
|
-
* the renderer. It cannot any more, and not for a packaging reason: the runtime is SHARED, and
|
|
7
|
-
* token values are exactly the thing that must diverge per component-package version — their
|
|
8
|
-
* value-derived property namespace is what lets two versions declare on `:root` without colliding.
|
|
9
|
-
* A shared module cannot own a per-version sheet. So the runtime owns placement (`ensureSheet`,
|
|
10
|
-
* anchored) and this package owns content, and the two meet here.
|
|
11
|
-
*
|
|
12
|
-
* The hazard it inherits is worth naming, because it was found by measurement rather than review.
|
|
13
|
-
* `ensureCoreTokens` was once called only where the renderer was CREATED, so a copy that adopted
|
|
14
|
-
* another copy's renderer installed no sheet and rendered every token-referencing atom against an
|
|
15
|
-
* undefined custom property. Reverting that hoist fails `gate:token-value-skew` checks 6, 7 and 8.
|
|
16
|
-
* Calling it here, on every copy's every use, is the same fix expressed at the new seam.
|
|
17
|
-
*
|
|
18
|
-
* Cost is a `Set.has` after the first call — `ensureSheet` keys on the sheet's own content hash.
|
|
19
|
-
*/
|
|
20
|
-
export type VoltStyles<Slots extends string> = Record<Slots, GriffelStyle>;
|
|
21
|
-
/**
|
|
22
|
-
* One class per slot, atoms deduped against whatever is already on the page.
|
|
23
|
-
*
|
|
24
|
-
* **The generic is over the object, not over the key union, and that is load-bearing.** Inferring a
|
|
25
|
-
* type parameter from `Record<Slots, …>` against an object literal widens `Slots` to `string`, so
|
|
26
|
-
* every slot name typechecks including ones that do not exist. OptionCard read `styles.card` in two
|
|
27
|
-
* places with no `card` slot declared and rendered with no card styling at all; tsc was clean and
|
|
28
|
-
* 322 tests passed. Only a pixel diff caught it.
|
|
29
|
-
*/
|
|
30
|
-
export declare function makeVoltStyles<S extends Record<string, GriffelStyle>>(styles: S): () => Record<keyof S & string, string>;
|
|
31
|
-
/**
|
|
32
|
-
* One monolithic class for an element's invariant base, rather than atoms.
|
|
33
|
-
*
|
|
34
|
-
* Lands in Griffel's `r` bucket, which sorts before every atom bucket, so variant atoms override it
|
|
35
|
-
* by source order without any specificity escalation. Exactly one reset class per element.
|
|
36
|
-
*/
|
|
37
|
-
export declare function makeVoltResetStyles(styles: GriffelResetStyle): () => string;
|