@exsto/ds 0.0.1-rc.1 → 0.0.1-rc.13
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 +108 -27
- package/dist/chunks/date-range-picker-CWVcHgy2.js +204 -0
- package/dist/chunks/date-range-picker-CWVcHgy2.js.map +1 -0
- package/dist/chunks/input-syWxjY2U.js +172 -0
- package/dist/chunks/input-syWxjY2U.js.map +1 -0
- package/dist/chunks/toggle-Bxg8P-61.js +490 -0
- package/dist/chunks/toggle-Bxg8P-61.js.map +1 -0
- package/dist/date-picker.js +345 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/ds/src/date-picker.d.ts +9 -0
- package/dist/ds/src/index.d.ts +2 -3
- package/dist/ds/src/rich-text-editor.d.ts +8 -0
- package/dist/index.js +4514 -2
- package/dist/index.js.map +1 -0
- package/dist/rich-text-editor.js +905 -0
- package/dist/rich-text-editor.js.map +1 -0
- package/dist/source-hash.txt +1 -0
- package/dist/styles.css +938 -235
- package/dist/theme.css +308 -0
- package/dist/theme.css.d.ts +2 -0
- package/dist/ui/src/components/edyn/animated-number/animated-number.d.ts +30 -0
- package/dist/ui/src/components/edyn/animated-number/animated-number.test.d.ts +9 -0
- package/dist/ui/src/components/edyn/animated-number/index.d.ts +1 -0
- package/dist/ui/src/components/edyn/audio-player/audio-player.d.ts +3 -2
- package/dist/ui/src/components/edyn/date-picker/date-picker.d.ts +76 -0
- package/dist/ui/src/components/edyn/date-picker/date-picker.state.test.d.ts +9 -0
- package/dist/ui/src/components/edyn/date-picker/date-text.d.ts +40 -0
- package/dist/ui/src/components/edyn/date-picker/index.d.ts +2 -0
- package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.d.ts +28 -0
- package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.test.d.ts +9 -0
- package/dist/ui/src/components/edyn/date-range-picker/index.d.ts +1 -0
- package/dist/ui/src/components/edyn/initials-avatar/index.d.ts +1 -0
- package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.d.ts +54 -0
- package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.test.d.ts +10 -0
- package/dist/ui/src/components/edyn/multi-select/index.d.ts +1 -0
- package/dist/ui/src/components/edyn/multi-select/multi-select.d.ts +106 -0
- package/dist/ui/src/components/edyn/multi-select/multi-select.test.d.ts +9 -0
- package/dist/ui/src/components/edyn/progress-line/index.d.ts +1 -0
- package/dist/ui/src/components/edyn/progress-line/progress-line.d.ts +23 -0
- package/dist/ui/src/components/edyn/progress-line/progress-line.test.d.ts +9 -0
- package/dist/ui/src/components/edyn/rich-text-content/allow-list.d.ts +11 -0
- package/dist/ui/src/components/edyn/rich-text-content/index.d.ts +2 -0
- package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.d.ts +22 -0
- package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.test.d.ts +8 -0
- package/dist/ui/src/components/edyn/rich-text-editor/extensions.d.ts +18 -0
- package/dist/ui/src/components/edyn/rich-text-editor/index.d.ts +3 -0
- package/dist/ui/src/components/edyn/rich-text-editor/mention-list.d.ts +17 -0
- package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.d.ts +53 -0
- package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.test.d.ts +6 -0
- package/dist/ui/src/components/edyn/rich-text-editor/serialize.d.ts +13 -0
- package/dist/ui/src/components/edyn/rich-text-editor/sync.d.ts +19 -0
- package/dist/ui/src/components/edyn/rich-text-editor/sync.test.d.ts +11 -0
- package/dist/ui/src/components/edyn/rich-text-editor/toolbar.d.ts +20 -0
- package/dist/ui/src/components/edyn/rich-text-editor/types.d.ts +68 -0
- package/dist/ui/src/components/edyn/video-player/video-player.d.ts +2 -2
- package/dist/ui/src/components/forwarded-props.test.d.ts +8 -0
- package/dist/ui/src/components/ui/accordion/accordion.d.ts +9 -8
- package/dist/ui/src/components/ui/attachment/attachment.d.ts +1 -1
- package/dist/ui/src/components/ui/badge/badge.d.ts +1 -1
- package/dist/ui/src/components/ui/button/button.behavior.test.d.ts +8 -0
- package/dist/ui/src/components/ui/button/button.d.ts +1 -1
- package/dist/ui/src/components/ui/command/command.d.ts +17 -1
- package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.d.ts +12 -1
- package/dist/ui/src/components/ui/input-group/input-group.d.ts +1 -1
- package/dist/ui/src/components/ui/item/item.d.ts +1 -1
- package/dist/ui/src/components/ui/pagination/pagination.d.ts +3 -2
- package/dist/ui/src/components/ui/popover/popover.d.ts +1 -1
- package/dist/ui/src/components/ui/progress/progress.behavior.test.d.ts +8 -0
- package/dist/ui/src/components/ui/progress/progress.d.ts +43 -1
- package/dist/ui/src/components/ui/scroll-area/scroll-area.behavior.test.d.ts +12 -0
- package/dist/ui/src/components/ui/scroll-area/scroll-area.d.ts +59 -6
- package/dist/ui/src/components/ui/separator/separator.behavior.test.d.ts +14 -0
- package/dist/ui/src/components/ui/separator/separator.d.ts +14 -0
- package/dist/ui/src/components/ui/table/table.behavior.test.d.ts +4 -5
- package/dist/ui/src/components/ui/table/table.d.ts +8 -1
- package/dist/ui/src/components/ui/tabs/tabs.d.ts +9 -8
- package/dist/ui/src/index.d.ts +6 -0
- package/dist/ui/src/lib/first-weekday.d.ts +6 -0
- package/dist/ui/src/lib/focus-ring.test.d.ts +8 -0
- package/dist/ui/src/lib/popup-list.d.ts +53 -0
- package/dist/ui/src/lib/popup-list.test.d.ts +10 -0
- package/package.json +32 -8
- package/dist/chunks/toggle-group-ByNq8g7H.js +0 -4263
- package/dist/chunks/toggle-group-ByNq8g7H.js.map +0 -1
- package/dist/dom/src/context.d.ts +0 -34
- package/dist/dom/src/define-element.d.ts +0 -11
- package/dist/dom/src/field-control.d.ts +0 -5
- package/dist/dom/src/index.d.ts +0 -6
- package/dist/dom/src/mode.d.ts +0 -8
- package/dist/dom/src/styles.d.ts +0 -6
- package/dist/dom/src/theme-state.d.ts +0 -1
- package/dist/dom/src/types.d.ts +0 -65
- package/dist/ds/src/elements.d.ts +0 -12
- package/dist/elements/src/edx-accordion.d.ts +0 -14
- package/dist/elements/src/edx-accordion.test.d.ts +0 -1
- package/dist/elements/src/edx-alert.d.ts +0 -14
- package/dist/elements/src/edx-audio-player.d.ts +0 -11
- package/dist/elements/src/edx-avatar.d.ts +0 -10
- package/dist/elements/src/edx-badge.d.ts +0 -12
- package/dist/elements/src/edx-breadcrumb.d.ts +0 -11
- package/dist/elements/src/edx-button-group.d.ts +0 -7
- package/dist/elements/src/edx-button.d.ts +0 -20
- package/dist/elements/src/edx-calendar.d.ts +0 -21
- package/dist/elements/src/edx-card.d.ts +0 -8
- package/dist/elements/src/edx-checkbox.d.ts +0 -18
- package/dist/elements/src/edx-combobox.d.ts +0 -28
- package/dist/elements/src/edx-content-components.d.ts +0 -2
- package/dist/elements/src/edx-dialog.d.ts +0 -20
- package/dist/elements/src/edx-drawer.d.ts +0 -21
- package/dist/elements/src/edx-dropdown-menu.d.ts +0 -29
- package/dist/elements/src/edx-field.d.ts +0 -9
- package/dist/elements/src/edx-field.test.d.ts +0 -1
- package/dist/elements/src/edx-indicator.d.ts +0 -14
- package/dist/elements/src/edx-input-group.d.ts +0 -32
- package/dist/elements/src/edx-input-otp.d.ts +0 -19
- package/dist/elements/src/edx-input.d.ts +0 -31
- package/dist/elements/src/edx-interactive-components.d.ts +0 -2
- package/dist/elements/src/edx-label.d.ts +0 -6
- package/dist/elements/src/edx-pagination.d.ts +0 -8
- package/dist/elements/src/edx-popover.d.ts +0 -24
- package/dist/elements/src/edx-progress.d.ts +0 -10
- package/dist/elements/src/edx-radio-group.d.ts +0 -22
- package/dist/elements/src/edx-radio-group.test.d.ts +0 -1
- package/dist/elements/src/edx-scroll-area.d.ts +0 -15
- package/dist/elements/src/edx-scroll-area.test.d.ts +0 -1
- package/dist/elements/src/edx-select.d.ts +0 -34
- package/dist/elements/src/edx-separator.d.ts +0 -10
- package/dist/elements/src/edx-skeleton.d.ts +0 -8
- package/dist/elements/src/edx-slider.d.ts +0 -17
- package/dist/elements/src/edx-slider.test.d.ts +0 -1
- package/dist/elements/src/edx-switch.d.ts +0 -18
- package/dist/elements/src/edx-table.d.ts +0 -13
- package/dist/elements/src/edx-table.test.d.ts +0 -1
- package/dist/elements/src/edx-tabs.d.ts +0 -15
- package/dist/elements/src/edx-tabs.test.d.ts +0 -1
- package/dist/elements/src/edx-textarea.d.ts +0 -25
- package/dist/elements/src/edx-toggle-group.d.ts +0 -27
- package/dist/elements/src/edx-toggle-group.test.d.ts +0 -1
- package/dist/elements/src/edx-toggle.d.ts +0 -18
- package/dist/elements/src/edx-tooltip.d.ts +0 -28
- package/dist/elements/src/edx-video-player.d.ts +0 -16
- package/dist/elements/src/field-control-bridge.d.ts +0 -7
- package/dist/elements/src/index.d.ts +0 -14
- package/dist/elements/src/projected-content.test.d.ts +0 -1
- package/dist/elements/src/registry.d.ts +0 -39
- package/dist/elements/src/registry.test.d.ts +0 -1
- package/dist/elements.js +0 -4020
- package/dist/elements.js.map +0 -1
- /package/dist/{dom/src/define-element.test.d.ts → ui/src/components/edyn/date-picker/date-text.test.d.ts} +0 -0
- /package/dist/{dom/src/native-slot.test.d.ts → ui/src/lib/first-weekday.test.d.ts} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
1
2
|
export type TPaginationRangeItem = number | 'ellipsis';
|
|
2
3
|
/**
|
|
3
4
|
* Compute the ordered list of page numbers and ellipsis markers to render.
|
|
@@ -7,11 +8,11 @@ export type TPaginationRangeItem = number | 'ellipsis';
|
|
|
7
8
|
export declare const getPaginationRange: (page: number, count: number, siblingCount?: number) => TPaginationRangeItem[];
|
|
8
9
|
/** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */
|
|
9
10
|
export declare const clampPage: (page: number, count: number) => number;
|
|
10
|
-
export interface IPaginationProps {
|
|
11
|
+
export interface IPaginationProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'className' | 'children'> {
|
|
11
12
|
page: number;
|
|
12
13
|
count: number;
|
|
13
14
|
onPageChange: (page: number) => void;
|
|
14
15
|
siblingCount?: number;
|
|
15
16
|
className?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const Pagination: ({ page, count, onPageChange, siblingCount, className }: IPaginationProps) =>
|
|
18
|
+
export declare const Pagination: ({ page, count, onPageChange, siblingCount, className, ...props }: IPaginationProps) => React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
|
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
export declare const Popover: ({ ...props }: PopoverPrimitive.Root.Props) => React.JSX.Element;
|
|
4
4
|
export declare const PopoverTrigger: ({ ...props }: PopoverPrimitive.Trigger.Props) => React.JSX.Element;
|
|
5
|
-
export declare const PopoverContent: ({ className, align, alignOffset, side, sideOffset, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) => React.JSX.Element;
|
|
5
|
+
export declare const PopoverContent: ({ className, align, alignOffset, side, sideOffset, anchor, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "anchor" | "side" | "sideOffset">) => React.JSX.Element;
|
|
6
6
|
export declare const PopoverHeader: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
7
7
|
export declare const PopoverTitle: ({ className, ...props }: PopoverPrimitive.Title.Props) => React.JSX.Element;
|
|
8
8
|
export declare const PopoverDescription: ({ className, ...props }: PopoverPrimitive.Description.Props) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress tones: a closed set of theme tokens, never a free class string.
|
|
3
|
+
*
|
|
4
|
+
* PATH TAKEN: classes and attributes do not depend on layout, so happy-dom is enough. The
|
|
5
|
+
* tokens' contrast is measured from the real tokens.css below, and the rendered colours in
|
|
6
|
+
* the browser by e2e/progress-tone.spec.ts.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
import { Progress as ProgressPrimitive } from '@base-ui/react/progress';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* The tones: a closed set of semantic colours rather than a class string, so a bar cannot carry a
|
|
5
|
+
* colour the theme does not define and dark mode and a re-theme keep working. Each is the theme token
|
|
6
|
+
* the fill uses; the track is a 20% tint of the same token.
|
|
7
|
+
*/
|
|
8
|
+
declare const TONE_TOKEN: {
|
|
9
|
+
readonly default: "var(--primary)";
|
|
10
|
+
readonly info: "var(--info)";
|
|
11
|
+
readonly success: "var(--success)";
|
|
12
|
+
readonly warning: "var(--warning)";
|
|
13
|
+
readonly destructive: "var(--destructive)";
|
|
14
|
+
};
|
|
15
|
+
export type TProgressTone = keyof typeof TONE_TOKEN;
|
|
16
|
+
/**
|
|
17
|
+
* Colours an app can set without a class string. --progress-color replaces the fill (any colour, such as an
|
|
18
|
+
* app's own status tokens); --progress-track replaces the track, which does not follow the fill: an app
|
|
19
|
+
* that wants a neutral track sets it to var(--muted). Both are read where the bar is, so they follow the
|
|
20
|
+
* theme and can be set on :root or on any ancestor.
|
|
21
|
+
*/
|
|
22
|
+
export declare const progressFill: (tone: TProgressTone) => string;
|
|
23
|
+
export declare const progressTrack: (tone: TProgressTone) => string;
|
|
24
|
+
/**
|
|
25
|
+
* How the fill eases its width. The defaults are the 300ms ease-in-out it always had; an app retunes them
|
|
26
|
+
* with --progress-duration and --progress-ease, or turns the easing off with `animated={false}` when the
|
|
27
|
+
* number it shows is itself animated and the bar is driven from the same clock.
|
|
28
|
+
*/
|
|
29
|
+
export declare const PROGRESS_DURATION = "var(--progress-duration, 300ms)";
|
|
30
|
+
export declare const PROGRESS_EASE = "var(--progress-ease, cubic-bezier(0.4, 0, 0.2, 1))";
|
|
31
|
+
declare const progressTrackVariants: (props?: ({
|
|
32
|
+
size?: "default" | "sm" | null | undefined;
|
|
33
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
2
34
|
export interface IProgressProps extends Omit<ProgressPrimitive.Root.Props, 'value'> {
|
|
3
35
|
value?: number | null;
|
|
36
|
+
/** The bar's colour: a share of a total reads as `warning` when nearly used up, `success` when done. */
|
|
37
|
+
tone?: TProgressTone;
|
|
38
|
+
/** 4px (`sm`) or 8px (default) tall. */
|
|
39
|
+
size?: VariantProps<typeof progressTrackVariants>['size'];
|
|
40
|
+
/**
|
|
41
|
+
* Whether the fill eases when `value` changes. Turn it off when the value already moves smoothly
|
|
42
|
+
* (driven from an animated number's clock), or the bar eases a second time behind it.
|
|
43
|
+
*/
|
|
44
|
+
animated?: boolean;
|
|
4
45
|
}
|
|
5
|
-
export declare const Progress: ({ value, className, ...props }: IProgressProps) => import('react').JSX.Element;
|
|
46
|
+
export declare const Progress: ({ value, tone, size, animated, className, ...props }: IProgressProps) => import('react').JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge-fade wiring and the sizing contract for ScrollArea.
|
|
3
|
+
*
|
|
4
|
+
* PATH TAKEN: the fades are cut by a mask in scroll-fade.css, keyed off the
|
|
5
|
+
* overflow flags Base UI keeps on the root (data-overflow-y-start and friends).
|
|
6
|
+
* happy-dom has neither layout nor a stylesheet, so what is checked here is the
|
|
7
|
+
* contract the stylesheet reads: which axis the component declares, and that
|
|
8
|
+
* nothing of the painted version is left behind. The mask itself, and the flags
|
|
9
|
+
* flipping at the right moment, are measured in a real browser by
|
|
10
|
+
* e2e/scroll-area-fade.spec.ts.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { ScrollArea as BaseScrollArea } from '@base-ui/react/scroll-area';
|
|
2
2
|
import { ComponentProps, RefObject } from 'react';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* When the bar shows: 'hover' on area hover or while scrolling (default),
|
|
5
|
+
* 'scroll' only while scrolling, 'always' permanent. In every mode the bar is
|
|
6
|
+
* mounted only while that axis actually overflows, so 'always' means "always
|
|
7
|
+
* when there is something to scroll", never a bar on a list that fits.
|
|
8
|
+
*/
|
|
4
9
|
export type TScrollbarVisibility = 'hover' | 'scroll' | 'always';
|
|
10
|
+
/**
|
|
11
|
+
* Surface the edge fades blended into, back when they were painted.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated The fades are cut into the content by a mask, so they match any
|
|
14
|
+
* surface without being told which one. Still accepted, and ignored.
|
|
15
|
+
*/
|
|
16
|
+
export type TScrollAreaFadeFrom = 'card' | 'background' | 'sidebar' | 'popover';
|
|
5
17
|
export interface IScrollBarProps extends ComponentProps<typeof BaseScrollArea.Scrollbar> {
|
|
6
18
|
visibility?: TScrollbarVisibility;
|
|
7
19
|
}
|
|
@@ -11,11 +23,37 @@ export interface IScrollAreaProps extends ComponentProps<typeof BaseScrollArea.R
|
|
|
11
23
|
orientation?: 'horizontal' | 'vertical' | 'both';
|
|
12
24
|
/** Scrollbar reveal behavior (mirrors the Radix ScrollArea `type` prop). */
|
|
13
25
|
type?: TScrollbarVisibility;
|
|
14
|
-
|
|
26
|
+
/** Edge fades hinting at clipped content; each one shows only while its own edge hides something. */
|
|
27
|
+
fade?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated No longer read. The fades mask the content, so they sit correctly
|
|
30
|
+
* on any surface; passing this does nothing and is safe to delete.
|
|
31
|
+
*/
|
|
32
|
+
fadeFrom?: TScrollAreaFadeFrom;
|
|
33
|
+
/** Places both bars, for a host that gives them a gutter of their own (a sidebar menu). */
|
|
34
|
+
scrollbarClassName?: string;
|
|
35
|
+
viewportId?: string;
|
|
15
36
|
/** Access to the scrollable viewport (e.g. to reset scroll position on route changes). */
|
|
37
|
+
viewportRef?: RefObject<HTMLDivElement | null>;
|
|
38
|
+
viewportClassName?: string;
|
|
39
|
+
/** Published on the viewport as data-scroll-restoration-id, for a router that restores scroll position. */
|
|
40
|
+
scrollRestorationId?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the viewport is a tab stop of its own (default). Turn it off inside a
|
|
43
|
+
* widget that already owns focus, a menu above all: its items are the tab
|
|
44
|
+
* stops, and a focusable wrapper between the role and its items is both
|
|
45
|
+
* redundant and an aria-required-children violation.
|
|
46
|
+
*/
|
|
47
|
+
focusable?: boolean;
|
|
48
|
+
/** @deprecated Use `viewportId`. */
|
|
49
|
+
viewPortId?: string;
|
|
50
|
+
/** @deprecated Use `viewportRef`. */
|
|
16
51
|
viewPortRef?: RefObject<HTMLDivElement | null>;
|
|
52
|
+
/** @deprecated Use `viewportClassName`. */
|
|
17
53
|
viewPortClassName?: string;
|
|
54
|
+
/** Places the vertical bar only; `scrollbarClassName` covers both. */
|
|
18
55
|
scrollVerticalClassName?: string;
|
|
56
|
+
/** Places the horizontal bar only; `scrollbarClassName` covers both. */
|
|
19
57
|
scrollHorizontalClassName?: string;
|
|
20
58
|
}
|
|
21
59
|
/**
|
|
@@ -24,9 +62,24 @@ export interface IScrollAreaProps extends ComponentProps<typeof BaseScrollArea.R
|
|
|
24
62
|
* rule: wide/tall content (tables, lists, code) always goes through this, never a bare
|
|
25
63
|
* overflow-* utility.
|
|
26
64
|
*
|
|
65
|
+
* Cap the height with a plain class on the component itself, e.g.
|
|
66
|
+
* `<ScrollArea className="max-h-88">`. The viewport picks the cap up through
|
|
67
|
+
* `max-h-inherit`, which matters because the viewport is the element that actually
|
|
68
|
+
* scrolls: a cap that lands only on the root leaves tall content spilling out
|
|
69
|
+
* underneath with no scrollbar, and that reads as a working height right up until the
|
|
70
|
+
* content outgrows it.
|
|
71
|
+
*
|
|
72
|
+
* `fade` fades out each edge that is currently hiding content, rather than always
|
|
73
|
+
* fading one: a permanent fade is a lie half the time, dimming the last row that fits
|
|
74
|
+
* and promising more below when the reader is already at the end. It is cut into the
|
|
75
|
+
* content by a mask (@edyn/theme/scroll-fade.css), so it needs no surface colour and
|
|
76
|
+
* reads correctly over a tint, a gradient or a glow. A host that keeps something
|
|
77
|
+
* unscrolled at the top, such as a sticky table header, exempts that band by setting
|
|
78
|
+
* --scroll-fade-offset on the ScrollArea. The static faded-* utilities in
|
|
79
|
+
* @edyn/theme/utilities.css are the other tool, for DECORATIVE edges that do not
|
|
80
|
+
* track scroll position.
|
|
81
|
+
*
|
|
27
82
|
* The viewport publishes its size as --scroll-area-width/--scroll-area-height CSS vars
|
|
28
|
-
* so children can size against the visible area.
|
|
29
|
-
* the faded-* utilities from @edyn/theme/utilities.css on the ScrollArea (it is the
|
|
30
|
-
* positioning root) where a fade is wanted.
|
|
83
|
+
* so children can size against the visible area.
|
|
31
84
|
*/
|
|
32
|
-
export declare const ScrollArea: ({ className, children, orientation, type, viewPortId, viewPortRef, viewPortClassName, scrollVerticalClassName, scrollHorizontalClassName, ...props }: IScrollAreaProps) => import('react').JSX.Element;
|
|
85
|
+
export declare const ScrollArea: ({ className, children, orientation, type, fade, fadeFrom, scrollbarClassName, viewportId, viewportRef, viewportClassName, scrollRestorationId, focusable, viewPortId, viewPortRef, viewPortClassName, scrollVerticalClassName, scrollHorizontalClassName, ...props }: IScrollAreaProps) => import('react').JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orientation styling for Separator, and a guard for the bug class behind it.
|
|
3
|
+
*
|
|
4
|
+
* Base UI publishes orientation as `data-orientation="horizontal|vertical"`. It
|
|
5
|
+
* has no `data-horizontal` / `data-vertical` attribute, so a bare
|
|
6
|
+
* `data-vertical:` variant compiles to a selector that matches nothing: the
|
|
7
|
+
* component looks styled, and silently is not. A vertical Separator came out
|
|
8
|
+
* with no width at all that way.
|
|
9
|
+
*
|
|
10
|
+
* PATH TAKEN: happy-dom renders no layout, so this asserts the class the
|
|
11
|
+
* component chose per orientation plus the attribute Base UI emitted, and the
|
|
12
|
+
* second block greps the package for the dead variant form.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
2
|
+
/**
|
|
3
|
+
* Hairline rule between content, announced as `role="separator"`.
|
|
4
|
+
*
|
|
5
|
+
* The orientation styles are branched in TS rather than written as
|
|
6
|
+
* `data-[orientation=*]:` variants on purpose. A variant carries two
|
|
7
|
+
* selectors' worth of specificity, so it would outrank a plain class passed in
|
|
8
|
+
* by the caller: the sidebar's own `w-auto` lost to `w-full` that way. Branching
|
|
9
|
+
* emits one plain class per axis, which `cn` can dedupe and a caller can
|
|
10
|
+
* override.
|
|
11
|
+
*
|
|
12
|
+
* Vertical uses `self-stretch` instead of `h-full`: a percentage height needs a
|
|
13
|
+
* definite parent, and the usual host is an `items-center` row whose height
|
|
14
|
+
* comes from its content.
|
|
15
|
+
*/
|
|
2
16
|
export declare const Separator: ({ className, orientation, ...props }: SeparatorPrimitive.Props) => import('react').JSX.Element;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Structure test for the Table primitives.
|
|
3
3
|
*
|
|
4
|
-
* Uses happy-dom (registered by test-setup.ts) and the
|
|
5
|
-
* pattern
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* (and the Angular demos that consume it) get a real, accessible table.
|
|
4
|
+
* Uses happy-dom (registered by test-setup.ts) and the React-in-bun-test
|
|
5
|
+
* pattern: render with createRoot + flushSync, then query the real DOM. Guards
|
|
6
|
+
* that the primitives produce a semantic <table> (thead/tbody/th/td/caption) and
|
|
7
|
+
* the shadcn overflow wrapper, so consumers get a real, accessible table.
|
|
9
8
|
*/
|
|
10
9
|
export {};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export interface ITableProps extends React.ComponentProps<'table'> {
|
|
3
|
+
/**
|
|
4
|
+
* The box around the table, which scrolls it sideways. `overflow-visible` turns that scroll off, for a table whose page or
|
|
5
|
+
* parent scrolls it, or whose sticky header would otherwise stick to this box instead of that one.
|
|
6
|
+
*/
|
|
7
|
+
containerClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Table: ({ className, containerClassName, ...props }: ITableProps) => React.JSX.Element;
|
|
3
10
|
export declare const TableHeader: ({ className, ...props }: React.ComponentProps<"thead">) => React.JSX.Element;
|
|
4
11
|
export declare const TableBody: ({ className, ...props }: React.ComponentProps<"tbody">) => React.JSX.Element;
|
|
5
12
|
export declare const TableFooter: ({ className, ...props }: React.ComponentProps<"tfoot">) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Tabs as BaseTabs } from '@base-ui/react/tabs';
|
|
1
2
|
import { VariantProps } from 'class-variance-authority';
|
|
2
3
|
import type * as React from 'react';
|
|
3
|
-
export interface ITabsProps {
|
|
4
|
+
export interface ITabsProps extends Omit<BaseTabs.Root.Props, 'value' | 'defaultValue' | 'onValueChange' | 'className' | 'orientation' | 'children'> {
|
|
4
5
|
/** Controlled selected tab. Provide with `onValueChange`. */
|
|
5
6
|
value?: string;
|
|
6
7
|
/** Uncontrolled initial tab. Use this when the component should own its state. */
|
|
@@ -10,26 +11,26 @@ export interface ITabsProps {
|
|
|
10
11
|
orientation?: 'horizontal' | 'vertical';
|
|
11
12
|
children: React.ReactNode;
|
|
12
13
|
}
|
|
13
|
-
export declare const Tabs: ({ value, defaultValue, onValueChange, className, orientation, children }: ITabsProps) => React.JSX.Element;
|
|
14
|
+
export declare const Tabs: ({ value, defaultValue, onValueChange, className, orientation, children, ...props }: ITabsProps) => React.JSX.Element;
|
|
14
15
|
export declare const tabsListVariants: (props?: ({
|
|
15
16
|
variant?: "default" | "line" | null | undefined;
|
|
16
17
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
17
|
-
export interface ITabsListProps extends VariantProps<typeof tabsListVariants> {
|
|
18
|
+
export interface ITabsListProps extends VariantProps<typeof tabsListVariants>, Omit<BaseTabs.List.Props, 'className' | 'children'> {
|
|
18
19
|
className?: string;
|
|
19
20
|
children: React.ReactNode;
|
|
20
21
|
}
|
|
21
|
-
export declare const TabsList: ({ className, variant, children }: ITabsListProps) => React.JSX.Element;
|
|
22
|
-
export interface ITabsTriggerProps {
|
|
22
|
+
export declare const TabsList: ({ className, variant, children, ...props }: ITabsListProps) => React.JSX.Element;
|
|
23
|
+
export interface ITabsTriggerProps extends Omit<BaseTabs.Tab.Props, 'value' | 'disabled' | 'className' | 'children'> {
|
|
23
24
|
value: string;
|
|
24
25
|
disabled?: boolean;
|
|
25
26
|
className?: string;
|
|
26
27
|
children: React.ReactNode;
|
|
27
28
|
}
|
|
28
|
-
export declare const TabsTrigger: ({ value, disabled, className, children }: ITabsTriggerProps) => React.JSX.Element;
|
|
29
|
-
export interface ITabsContentProps {
|
|
29
|
+
export declare const TabsTrigger: ({ value, disabled, className, children, ...props }: ITabsTriggerProps) => React.JSX.Element;
|
|
30
|
+
export interface ITabsContentProps extends Omit<BaseTabs.Panel.Props, 'value' | 'keepMounted' | 'className' | 'children'> {
|
|
30
31
|
value: string;
|
|
31
32
|
keepMounted?: boolean;
|
|
32
33
|
className?: string;
|
|
33
34
|
children: React.ReactNode;
|
|
34
35
|
}
|
|
35
|
-
export declare const TabsContent: ({ value, keepMounted, className, children }: ITabsContentProps) => React.JSX.Element;
|
|
36
|
+
export declare const TabsContent: ({ value, keepMounted, className, children, ...props }: ITabsContentProps) => React.JSX.Element;
|
package/dist/ui/src/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
export * from './components/edyn/animated-number';
|
|
1
2
|
export * from './components/edyn/audio-player';
|
|
3
|
+
export * from './components/edyn/date-range-picker';
|
|
4
|
+
export * from './components/edyn/initials-avatar';
|
|
5
|
+
export * from './components/edyn/multi-select';
|
|
6
|
+
export * from './components/edyn/progress-line';
|
|
7
|
+
export * from './components/edyn/rich-text-content';
|
|
2
8
|
export * from './components/edyn/video-player';
|
|
3
9
|
export * from './components/ui/accordion';
|
|
4
10
|
export * from './components/ui/alert';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type TWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
2
|
+
/**
|
|
3
|
+
* The weekday a locale starts its week on, 0 for Sunday to 6 for Saturday, from Intl, so en-GB starts on Monday and en-US on
|
|
4
|
+
* Sunday with no locale data of our own shipped. A browser without week info gets the region's usual start.
|
|
5
|
+
*/
|
|
6
|
+
export declare const firstWeekdayOf: (locale: string) => TWeekday;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default focus ring must be visible, not just present. WCAG 1.4.11 asks 3:1 for the
|
|
3
|
+
* parts of a control that show its state, and the ring is drawn outside the control, on
|
|
4
|
+
* whatever surface it sits on. This reads the real tokens.css, converts OKLCH to sRGB and
|
|
5
|
+
* measures the default --ring against every surface a control sits on, in both themes.
|
|
6
|
+
* An app that sets its own --ring (a brand) is outside this: it owns that colour.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one look for a list in a popup or a menu: the command palette, Select,
|
|
3
|
+
* Combobox, MultiSelect and the dropdown menus.
|
|
4
|
+
*
|
|
5
|
+
* These lists used to disagree with each other in every detail that shows:
|
|
6
|
+
* three different radii, two different paddings, a grey fill for the highlight
|
|
7
|
+
* in one and the accent in another, and the chosen item marked by a check on
|
|
8
|
+
* the left in Select and on the right in the menus. Picking something from one
|
|
9
|
+
* list then felt like a different product from picking something in the next.
|
|
10
|
+
*
|
|
11
|
+
* It lives here as classes rather than as a stylesheet so a caller's own
|
|
12
|
+
* className still wins: an unlayered rule would beat every utility, including
|
|
13
|
+
* the one someone passes for a single list.
|
|
14
|
+
*
|
|
15
|
+
* ONE ITEM: transparent at rest, 32px tall, 6px radius (--radius-sm), 6px by
|
|
16
|
+
* 8px of padding, text-sm, its own icons 16px and muted. Under the pointer or
|
|
17
|
+
* the keyboard it takes one translucent fill of the text colour, and its icons
|
|
18
|
+
* the text colour. Chosen is medium weight with a check at the END, never a
|
|
19
|
+
* fill, so "where I am" and "what I picked" can be told apart at a glance.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Which primitive renders the item, because the two disagree about the same
|
|
23
|
+
* attribute names in a way that silently breaks the styling:
|
|
24
|
+
*
|
|
25
|
+
* - cmdk writes `data-selected="false"` and `data-disabled="false"` on items
|
|
26
|
+
* that are neither, so a bare `data-selected:` variant matches EVERY item and
|
|
27
|
+
* highlights the whole list. Its states have to be matched by value.
|
|
28
|
+
* - Base UI omits the attribute instead, so presence is the test there. That
|
|
29
|
+
* needs the BRACKET form for `selected`: shadcn redefines the bare
|
|
30
|
+
* `data-selected:` variant to match only data-selected="true" (for the
|
|
31
|
+
* calendar), and Base UI writes it as an empty string, so the bare form
|
|
32
|
+
* compiles and silently never applies. `highlighted` and `disabled` have no
|
|
33
|
+
* such override, so those stay bare.
|
|
34
|
+
* - And the same name means different things: cmdk's `data-selected` is the
|
|
35
|
+
* keyboard cursor, Base UI's is the chosen value. In cmdk the chosen state is
|
|
36
|
+
* `data-checked`, which the DS's own CommandItem sets.
|
|
37
|
+
*/
|
|
38
|
+
export type TPopupItemFlavor = 'base-ui' | 'cmdk';
|
|
39
|
+
/** The shared item look. `checkable` leaves room at the end for the check. */
|
|
40
|
+
export declare const popupItemClass: (flavor?: TPopupItemFlavor, checkable?: boolean) => string;
|
|
41
|
+
/**
|
|
42
|
+
* The check's slot, at the end of the item and the same size whether or not the
|
|
43
|
+
* check is in it, so a list does not shift as the choice moves.
|
|
44
|
+
*/
|
|
45
|
+
export declare const POPUP_ITEM_INDICATOR_CLASS = "pointer-events-none absolute right-2 flex size-4 items-center justify-center text-foreground";
|
|
46
|
+
/** A group's heading in any of these lists. */
|
|
47
|
+
export declare const POPUP_GROUP_LABEL_CLASS = "px-2 py-1.5 text-xs font-medium text-muted-foreground";
|
|
48
|
+
/**
|
|
49
|
+
* How wide a combobox's list is: never narrower than the control it opens from, and as wide as its longest option up to
|
|
50
|
+
* 28rem or what the window leaves from the control's start (the list is aligned to that start), whichever is less. A
|
|
51
|
+
* control wider than that cap keeps its own width. Longer options are cut by their item, they do not widen the list.
|
|
52
|
+
*/
|
|
53
|
+
export declare const POPUP_LIST_WIDTH_CLASS = "min-w-(--anchor-width) max-w-[max(var(--anchor-width),min(28rem,var(--available-width)))]";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared popup list style, and the trap it exists to keep closed.
|
|
3
|
+
*
|
|
4
|
+
* PATH TAKEN: the look itself is measured in a real browser across the lists and
|
|
5
|
+
* both themes (e2e/popup-lists.spec.ts), because computed padding and radius are
|
|
6
|
+
* the only honest proof of "one look". What is checked here is the part a
|
|
7
|
+
* stylesheet cannot: that each list takes its item look from one place, and that
|
|
8
|
+
* the two primitives' disagreeing attribute conventions are matched correctly.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exsto/ds",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
4
|
-
"description": "The eDynamix design system: React components
|
|
3
|
+
"version": "0.0.1-rc.13",
|
|
4
|
+
"description": "The eDynamix design system: React components and design tokens.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"exsto",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"react",
|
|
11
11
|
"components",
|
|
12
12
|
"ui",
|
|
13
|
-
"web-components",
|
|
14
13
|
"tailwind"
|
|
15
14
|
],
|
|
16
15
|
"type": "module",
|
|
@@ -28,24 +27,50 @@
|
|
|
28
27
|
"types": "./dist/ds/src/index.d.ts",
|
|
29
28
|
"default": "./dist/index.js"
|
|
30
29
|
},
|
|
31
|
-
"./
|
|
32
|
-
"types": "./dist/ds/src/
|
|
33
|
-
"default": "./dist/
|
|
30
|
+
"./date-picker": {
|
|
31
|
+
"types": "./dist/ds/src/date-picker.d.ts",
|
|
32
|
+
"default": "./dist/date-picker.js"
|
|
33
|
+
},
|
|
34
|
+
"./rich-text-editor": {
|
|
35
|
+
"types": "./dist/ds/src/rich-text-editor.d.ts",
|
|
36
|
+
"default": "./dist/rich-text-editor.js"
|
|
34
37
|
},
|
|
35
38
|
"./styles.css": {
|
|
36
39
|
"types": "./dist/styles.css.d.ts",
|
|
37
40
|
"default": "./dist/styles.css"
|
|
38
41
|
},
|
|
42
|
+
"./theme.css": {
|
|
43
|
+
"types": "./dist/theme.css.d.ts",
|
|
44
|
+
"default": "./dist/theme.css"
|
|
45
|
+
},
|
|
39
46
|
"./package.json": "./package.json"
|
|
40
47
|
},
|
|
41
48
|
"scripts": {
|
|
42
49
|
"build": "vite build",
|
|
50
|
+
"prepack": "npm run build && bun run ../../scripts/check-ds-dist.ts",
|
|
43
51
|
"typecheck": "tsc --noEmit"
|
|
44
52
|
},
|
|
45
53
|
"dependencies": {
|
|
46
54
|
"@base-ui/react": "~1.8.0",
|
|
47
55
|
"@shadcn/react": "^0.3.1",
|
|
48
56
|
"@tabler/icons-react": "^3.44.0",
|
|
57
|
+
"@tanstack/react-virtual": "^3.13.0",
|
|
58
|
+
"@tiptap/core": "3.32.2",
|
|
59
|
+
"@tiptap/extension-bold": "3.32.2",
|
|
60
|
+
"@tiptap/extension-document": "3.32.2",
|
|
61
|
+
"@tiptap/extension-hard-break": "3.32.2",
|
|
62
|
+
"@tiptap/extension-horizontal-rule": "3.32.2",
|
|
63
|
+
"@tiptap/extension-italic": "3.32.2",
|
|
64
|
+
"@tiptap/extension-link": "3.32.2",
|
|
65
|
+
"@tiptap/extension-list": "3.32.2",
|
|
66
|
+
"@tiptap/extension-mention": "3.32.2",
|
|
67
|
+
"@tiptap/extension-paragraph": "3.32.2",
|
|
68
|
+
"@tiptap/extension-text": "3.32.2",
|
|
69
|
+
"@tiptap/extension-underline": "3.32.2",
|
|
70
|
+
"@tiptap/extensions": "3.32.2",
|
|
71
|
+
"@tiptap/pm": "3.32.2",
|
|
72
|
+
"@tiptap/react": "3.32.2",
|
|
73
|
+
"@tiptap/suggestion": "3.32.2",
|
|
49
74
|
"class-variance-authority": "^0.7.1",
|
|
50
75
|
"clsx": "^2.1.1",
|
|
51
76
|
"cmdk": "^1.1.1",
|
|
@@ -62,10 +87,9 @@
|
|
|
62
87
|
"react-dom": "^19.0.0"
|
|
63
88
|
},
|
|
64
89
|
"devDependencies": {
|
|
65
|
-
"@edyn/dom": "workspace:*",
|
|
66
|
-
"@edyn/elements": "workspace:*",
|
|
67
90
|
"@edyn/theme": "workspace:*",
|
|
68
91
|
"@edyn/ui": "workspace:*",
|
|
92
|
+
"@tailwindcss/node": "catalog:",
|
|
69
93
|
"@tailwindcss/vite": "catalog:",
|
|
70
94
|
"@vitejs/plugin-react": "catalog:",
|
|
71
95
|
"vite": "catalog:",
|