neba 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -16
- package/dist/components/avatar/Avatar.d.ts +100 -0
- package/dist/components/avatar/Avatar.js +1 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/blockquote/Blockquote.d.ts +65 -0
- package/dist/components/blockquote/Blockquote.js +1 -0
- package/dist/components/blockquote/index.d.ts +2 -0
- package/dist/components/blockquote/index.js +1 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +92 -0
- package/dist/components/breadcrumb/Breadcrumb.js +1 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/carousel/Carousel.d.ts +74 -0
- package/dist/components/carousel/Carousel.js +1 -0
- package/dist/components/carousel/index.d.ts +2 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/chat-bubble/ChatBubble.d.ts +114 -0
- package/dist/components/chat-bubble/ChatBubble.js +1 -0
- package/dist/components/chat-bubble/index.d.ts +2 -0
- package/dist/components/chat-bubble/index.js +1 -0
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/container/Container.d.ts +55 -0
- package/dist/components/container/Container.js +1 -0
- package/dist/components/container/index.d.ts +2 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +75 -0
- package/dist/components/date-picker/DatePicker.js +1 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-range-picker/DateRangePicker.d.ts +81 -0
- package/dist/components/date-range-picker/DateRangePicker.js +1 -0
- package/dist/components/date-range-picker/index.d.ts +2 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-time-picker/DateTimePicker.d.ts +68 -0
- package/dist/components/date-time-picker/DateTimePicker.js +1 -0
- package/dist/components/date-time-picker/index.d.ts +2 -0
- package/dist/components/date-time-picker/index.js +1 -0
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/divider/Divider.d.ts +19 -0
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/grid/Grid.d.ts +50 -0
- package/dist/components/grid/Grid.js +1 -0
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/grid/index.js +1 -0
- package/dist/components/grid-container/GridContainer.d.ts +79 -0
- package/dist/components/grid-container/GridContainer.js +1 -0
- package/dist/components/grid-container/index.d.ts +2 -0
- package/dist/components/grid-container/index.js +1 -0
- package/dist/components/highlight/Highlight.d.ts +84 -0
- package/dist/components/highlight/Highlight.js +1 -0
- package/dist/components/highlight/index.d.ts +2 -0
- package/dist/components/highlight/index.js +1 -0
- package/dist/components/icon/Icon.d.ts +58 -0
- package/dist/components/icon/Icon.js +1 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/icon-button/IconButton.d.ts +39 -0
- package/dist/components/icon-button/IconButton.js +1 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +1 -0
- package/dist/components/otp-field/OtpField.d.ts +85 -0
- package/dist/components/otp-field/OtpField.js +1 -0
- package/dist/components/otp-field/index.d.ts +2 -0
- package/dist/components/otp-field/index.js +1 -0
- package/dist/components/pagination/Pagination.js +1 -1
- package/dist/components/panes/Panes.d.ts +78 -0
- package/dist/components/panes/Panes.js +1 -0
- package/dist/components/panes/index.d.ts +2 -0
- package/dist/components/panes/index.js +1 -0
- package/dist/components/pill/Pill.d.ts +80 -0
- package/dist/components/pill/Pill.js +1 -0
- package/dist/components/pill/index.d.ts +2 -0
- package/dist/components/pill/index.js +1 -0
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/segmented-button/SegmentedButton.d.ts +77 -0
- package/dist/components/segmented-button/SegmentedButton.js +1 -0
- package/dist/components/segmented-button/index.d.ts +2 -0
- package/dist/components/segmented-button/index.js +1 -0
- package/dist/components/select/Select.js +1 -1
- package/dist/components/shortcut/Shortcut.d.ts +60 -0
- package/dist/components/shortcut/Shortcut.js +1 -0
- package/dist/components/shortcut/index.d.ts +2 -0
- package/dist/components/shortcut/index.js +1 -0
- package/dist/components/spoiler/Spoiler.d.ts +95 -0
- package/dist/components/spoiler/Spoiler.js +1 -0
- package/dist/components/spoiler/index.d.ts +2 -0
- package/dist/components/spoiler/index.js +1 -0
- package/dist/components/statistic/Statistic.d.ts +91 -0
- package/dist/components/statistic/Statistic.js +1 -0
- package/dist/components/statistic/index.d.ts +2 -0
- package/dist/components/statistic/index.js +1 -0
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/text-link/TextLink.d.ts +82 -0
- package/dist/components/text-link/TextLink.js +1 -0
- package/dist/components/text-link/index.d.ts +2 -0
- package/dist/components/text-link/index.js +1 -0
- package/dist/components/time-picker/TimePicker.d.ts +76 -0
- package/dist/components/time-picker/TimePicker.js +1 -0
- package/dist/components/time-picker/index.d.ts +2 -0
- package/dist/components/time-picker/index.js +1 -0
- package/dist/components/timeline/Timeline.d.ts +98 -0
- package/dist/components/timeline/Timeline.js +1 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/timeline/index.js +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +67 -0
- package/dist/components/toolbar/Toolbar.js +1 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/tree-view/TreeView.d.ts +115 -0
- package/dist/components/tree-view/TreeView.js +1 -0
- package/dist/components/tree-view/index.d.ts +2 -0
- package/dist/components/tree-view/index.js +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +1 -1
- package/dist/internal/calendar.d.ts +149 -0
- package/dist/internal/calendar.js +1 -0
- package/dist/internal/date.d.ts +170 -0
- package/dist/internal/date.js +1 -0
- package/dist/internal/grid.d.ts +69 -0
- package/dist/internal/grid.js +1 -0
- package/dist/internal/i18n.d.ts +78 -0
- package/dist/internal/i18n.js +1 -0
- package/dist/internal/icons.d.ts +54 -0
- package/dist/internal/icons.js +1 -1
- package/dist/internal/picker.d.ts +111 -0
- package/dist/internal/picker.js +1 -0
- package/dist/internal/sizer.d.ts +33 -0
- package/dist/internal/sizer.js +1 -0
- package/dist/internal/styles.d.ts +33 -0
- package/dist/internal/styles.js +1 -1
- package/dist/styles.css +2 -758
- package/dist/tailwind.css +1017 -0
- package/dist/types.d.ts +65 -0
- package/package.json +25 -12
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PickerLabels, type TimeUnit } from '../../internal/calendar';
|
|
3
|
+
import { type PickerShellProps } from '../../internal/picker';
|
|
4
|
+
/**
|
|
5
|
+
* Which column of the clock a row belongs to. Re-exported so a caller writing a
|
|
6
|
+
* `shouldDisableTime` rule can name the argument it is handed.
|
|
7
|
+
*/
|
|
8
|
+
export type { TimeUnit };
|
|
9
|
+
export interface TimePickerProps extends PickerShellProps {
|
|
10
|
+
/** The chosen time. A `Date`, so it carries a day as well — see `referenceDate`. */
|
|
11
|
+
value?: Date | null;
|
|
12
|
+
defaultValue?: Date | null;
|
|
13
|
+
onValueChange?: (value: Date | null) => void;
|
|
14
|
+
open?: boolean;
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
/**
|
|
18
|
+
* The day a chosen time is written onto while there is no value yet.
|
|
19
|
+
* @default today
|
|
20
|
+
*/
|
|
21
|
+
referenceDate?: Date;
|
|
22
|
+
/** The earliest time of day that may be chosen. Only the clock is read. */
|
|
23
|
+
minTime?: Date | null;
|
|
24
|
+
/** The latest time of day that may be chosen. */
|
|
25
|
+
maxTime?: Date | null;
|
|
26
|
+
/**
|
|
27
|
+
* Blocks individual rows. Called once per row per column with the instant that
|
|
28
|
+
* row would produce and the column it is in, so a rule may be as coarse as
|
|
29
|
+
* "no afternoons" or as fine as one minute.
|
|
30
|
+
*/
|
|
31
|
+
shouldDisableTime?: (value: Date, unit: TimeUnit) => boolean;
|
|
32
|
+
/** A 12-hour dial with an AM/PM column. Defaults to whatever the locale does. */
|
|
33
|
+
hour12?: boolean;
|
|
34
|
+
/** Adds the seconds column. @default false */
|
|
35
|
+
showSeconds?: boolean;
|
|
36
|
+
/** How far apart the rows of each column are. @default 1 */
|
|
37
|
+
hourStep?: number;
|
|
38
|
+
minuteStep?: number;
|
|
39
|
+
secondStep?: number;
|
|
40
|
+
locale?: string;
|
|
41
|
+
/**
|
|
42
|
+
* How the trigger writes the chosen time. Passed straight to `Intl`.
|
|
43
|
+
* @default { hour: 'numeric', minute: '2-digit' }, plus seconds when shown
|
|
44
|
+
*/
|
|
45
|
+
format?: Intl.DateTimeFormatOptions;
|
|
46
|
+
placeholder?: React.ReactNode;
|
|
47
|
+
clearable?: boolean;
|
|
48
|
+
/** Offers the shortcut to the current time in the footer. @default true */
|
|
49
|
+
showNowButton?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Closes the popup as soon as any column is touched. `false` by default and
|
|
52
|
+
* unlike DatePicker, because a time is two answers and closing after the first
|
|
53
|
+
* one would make choosing 9:30 a matter of opening the popup twice.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
closeOnSelect?: boolean;
|
|
57
|
+
labels?: Partial<PickerLabels>;
|
|
58
|
+
/** Identifies the field when a form is submitted, as `HH:MM` (`HH:MM:SS`). */
|
|
59
|
+
name?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A time of day, chosen from columns.
|
|
63
|
+
*
|
|
64
|
+
* The bounds are checked at the granularity of the column being drawn, which is
|
|
65
|
+
* the detail that separates a working time picker from a frustrating one. With a
|
|
66
|
+
* `minTime` of 09:30, the hour `9` stays available — the hour *contains* allowed
|
|
67
|
+
* minutes — and it is the minute column that greys out `00` through `25`. The
|
|
68
|
+
* naive check compares the whole candidate instant and hides the 9 entirely,
|
|
69
|
+
* which makes half past nine unreachable.
|
|
70
|
+
*
|
|
71
|
+
* The value is a `Date` rather than a string or a number of minutes, because
|
|
72
|
+
* everything else in this library that carries a moment is one, and because a
|
|
73
|
+
* time on its own has nowhere to record that it crossed a DST boundary.
|
|
74
|
+
* `referenceDate` is the day a bare time is written onto.
|
|
75
|
+
*/
|
|
76
|
+
export declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as o from"react";import{Button as t}from"../button/Button";import{TimeGrid as l,usePickerLabels as a}from"../../internal/calendar";import{ClockIcon as i}from"../../internal/icons";import{PickerFooter as r,PickerShell as s}from"../../internal/picker";import{displaySamples as c,formatDate as d,isHour12 as u,isValidDate as m,secondsOfDay as p,timeUnitSpan as h,toISOTime as f,withPlaceholder as S,withTime as b}from"../../internal/date";import{cx as g}from"../../internal/styles";export const TimePicker=o.forwardRef(function({value:y,defaultValue:v,onValueChange:x,open:C,defaultOpen:w,onOpenChange:z,referenceDate:k,minTime:D,maxTime:O,shouldDisableTime:T,hour12:j,showSeconds:V=!1,hourStep:B=1,minuteStep:I=1,secondStep:M=1,locale:N,format:R,placeholder:F,clearable:H=!1,showNowButton:P=!0,closeOnSelect:q=!1,labels:A,name:E,size:G="md",color:J="primary",density:K="default",readOnly:L=!1,disabled:Q=!1,startIcon:U,...W},X){const Y=a(A),Z=j??u(N),[$,_]=o.useState(v??null),ee=void 0!==y?y:$,[ne,oe]=o.useState(w??!1),te=C??ne,[le]=o.useState(()=>k??new Date),ae=e=>{e&&(L||Q)||(void 0===C&&oe(e),z?.(e))},ie=e=>{void 0===y&&_(e),x?.(e)},re=o.useCallback((e,n)=>{const[o,t]=h(n,e);return!!(m(D)&&t<p(D))||(!!(m(O)&&o>p(O))||(T?.(e,n)??!1))},[D,O,T]),se=R??{hour:"numeric",minute:"2-digit",...V?{second:"2-digit"}:{}},ce=new Date,de=b(k??le,{hours:ce.getHours(),minutes:ce.getMinutes(),seconds:V?ce.getSeconds():0}),ue=P||H||!q,me=o.useMemo(()=>S(c(N,se),F),[N,se,F]);return e(s,{...W,size:G,color:J,density:K,readOnly:L,disabled:Q,triggerRef:X,startIcon:U??e(i,{}),display:m(ee)?d(ee,N,se):F??"",samples:me,empty:!m(ee),clearable:H,onClear:()=>ie(null),open:te,onOpenChange:ae,labels:Y,hiddenValues:E?[{name:E,value:m(ee)?f(ee,V):""}]:void 0,children:n("div",{className:g("flex flex-col",ue&&"gap-1.5"),children:[e(l,{size:G,density:K,locale:N,value:m(ee)?ee:null,referenceDate:k??le,onChange:e=>{ie(e),q&&ae(!1)},hour12:Z,showSeconds:V,hourStep:B,minuteStep:I,secondStep:M,shouldDisableTime:re,labels:Y,autoFocus:!0}),ue?n(r,{size:G,children:[H?e(t,{variant:"text",size:G,color:J,density:"compact",onClick:()=>{ie(null),ae(!1)},children:Y.clear}):null,P?e(t,{variant:"text",size:G,color:J,density:"compact",disabled:re(de,"second"),onClick:()=>{ie(de),ae(!1)},children:Y.now}):null,q?null:e(t,{variant:"solid",size:G,color:J,density:"compact",onClick:()=>ae(!1),children:Y.done})]}):null]})})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{TimePicker}from"./TimePicker";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { NebaColor, NebaDensity, NebaOrientation, NebaSize } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* How far along one item is.
|
|
6
|
+
*
|
|
7
|
+
* Three states rather than two, because "the one you are on" is not the same
|
|
8
|
+
* claim as "done" and a sequence that cannot say which step is current is a
|
|
9
|
+
* list. Each gets its own axis — a filled bullet, a filled bullet with a halo
|
|
10
|
+
* around it, an empty one — rather than three shades of the same thing.
|
|
11
|
+
*/
|
|
12
|
+
export type TimelineStatus = 'complete' | 'current' | 'upcoming';
|
|
13
|
+
/** How the line between two items is drawn. `none` leaves the gap open. */
|
|
14
|
+
export type TimelineConnector = 'solid' | 'dashed' | 'dotted' | 'none';
|
|
15
|
+
export interface TimelineProps extends Omit<React.ComponentPropsWithoutRef<'ol'>, 'color'> {
|
|
16
|
+
/**
|
|
17
|
+
* How far the sequence has got: the index of the item being worked on now.
|
|
18
|
+
* Everything before it is complete, everything after it is still to come.
|
|
19
|
+
*
|
|
20
|
+
* An index rather than a value, because a timeline has no selection — nothing
|
|
21
|
+
* here is chosen, and the only question is how far down the list reality has
|
|
22
|
+
* reached. Omit it and every item is `upcoming` unless it says otherwise; pass
|
|
23
|
+
* the item count to mark the whole sequence done.
|
|
24
|
+
*/
|
|
25
|
+
active?: number;
|
|
26
|
+
/** @default 'md' */
|
|
27
|
+
size?: NebaSize;
|
|
28
|
+
/** @default 'primary' */
|
|
29
|
+
color?: NebaColor;
|
|
30
|
+
/** Spacing between items. Never the type scale, never the bullet. */
|
|
31
|
+
density?: NebaDensity;
|
|
32
|
+
/**
|
|
33
|
+
* Which way the sequence runs. `vertical` is the default and the one that
|
|
34
|
+
* takes an arbitrary number of steps with an arbitrary amount to say about
|
|
35
|
+
* each; `horizontal` is the stepper across the top of a checkout, and it is
|
|
36
|
+
* only honest while every label is short.
|
|
37
|
+
* @default 'vertical'
|
|
38
|
+
*/
|
|
39
|
+
orientation?: NebaOrientation;
|
|
40
|
+
/** Renders something other than an `<ol>` — Base UI's own escape hatch. */
|
|
41
|
+
render?: useRender.RenderProp;
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export interface TimelineItemProps extends Omit<React.ComponentPropsWithoutRef<'li'>, 'color' | 'title'> {
|
|
45
|
+
/** The heading of this step. */
|
|
46
|
+
title?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* When it happened — a date, a duration, a name. Set beside the title on a
|
|
49
|
+
* wide item and under it on a narrow one.
|
|
50
|
+
*/
|
|
51
|
+
meta?: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* What goes inside the bullet: a number, an icon, an avatar. Omit it and the
|
|
54
|
+
* bullet is a plain disc, which is what a step with nothing to say about
|
|
55
|
+
* itself should be.
|
|
56
|
+
*/
|
|
57
|
+
bullet?: React.ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* Overrides what the timeline's `active` would have computed for this item —
|
|
60
|
+
* a step that failed and stopped the sequence, a step that was skipped.
|
|
61
|
+
*/
|
|
62
|
+
status?: TimelineStatus;
|
|
63
|
+
/** Overrides the timeline's colour family for this item alone. */
|
|
64
|
+
color?: NebaColor;
|
|
65
|
+
/**
|
|
66
|
+
* How the line to the next item is drawn.
|
|
67
|
+
* @default 'solid'
|
|
68
|
+
*/
|
|
69
|
+
connector?: TimelineConnector;
|
|
70
|
+
/** The body of the step. */
|
|
71
|
+
children?: React.ReactNode;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* One step.
|
|
75
|
+
*
|
|
76
|
+
* Its index is not a prop and cannot be: an item that had to be told where it
|
|
77
|
+
* was in the list would be an item every caller could put in the wrong place,
|
|
78
|
+
* and `active={2}` would stop meaning anything. The Timeline numbers its
|
|
79
|
+
* children as it walks them, and hands each one its index through a context.
|
|
80
|
+
*/
|
|
81
|
+
export declare const TimelineItem: React.ForwardRefExoticComponent<TimelineItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
82
|
+
/**
|
|
83
|
+
* A sequence of steps, in the order they happen in.
|
|
84
|
+
*
|
|
85
|
+
* There is no Base UI primitive under this and there should not be: a timeline
|
|
86
|
+
* has no selection, no roving focus and no keyboard contract — it is a list, and
|
|
87
|
+
* reaching for a composite primitive to draw one would hand every consumer's
|
|
88
|
+
* record of events the semantics of a widget.
|
|
89
|
+
*
|
|
90
|
+
* It is an `<ol>` for the reason it exists at all: the order *is* the content. A
|
|
91
|
+
* screen reader announcing "list of 5 items" over an unordered list would be
|
|
92
|
+
* describing something else.
|
|
93
|
+
*
|
|
94
|
+
* The children are numbered here rather than by a prop on each item, so `active`
|
|
95
|
+
* has something to count against and inserting a step in the middle does not
|
|
96
|
+
* mean renumbering the ones after it.
|
|
97
|
+
*/
|
|
98
|
+
export declare const Timeline: React.ForwardRefExoticComponent<TimelineProps & React.RefAttributes<HTMLOListElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as l}from"react/jsx-runtime";import*as r from"react";import{useRender as t}from"@base-ui/react/use-render";import{cx as n,hasContent as a,iconClasses as o,metaTextClasses as s,sheetBodyClasses as i,sheetTitleClasses as d,surfaceClasses as c,surfaceSlots as m,transitionClasses as p}from"../../internal/styles";const u=r.createContext(null),b=r.createContext({index:0,last:!1}),x={xs:"0.875rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"1.875rem"},f={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4"},v={default:{xs:"pb-5",sm:"pb-6",md:"pb-7",lg:"pb-8",xl:"pb-10"},compact:{xs:"pb-3",sm:"pb-3.5",md:"pb-4",lg:"pb-5",xl:"pb-6"}},g={default:{xs:"pe-5",sm:"pe-6",md:"pe-7",lg:"pe-8",xl:"pe-10"},compact:{xs:"pe-3",sm:"pe-3.5",md:"pe-4",lg:"pe-5",xl:"pe-6"}},h={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",none:""},y={complete:`${c} bg-(--n-fill) text-(--n-on-solid) [box-shadow:var(--neba-plate-solid)]`,current:`${c} bg-(--n-fill) text-(--n-on-solid) [box-shadow:0_0_0_0.25rem_var(--n-soft),var(--neba-plate-solid)]`,upcoming:`${c} border-2 bg-(--n-panel) text-(--neba-muted-fg) [border-color:var(--n-line)]`},N={complete:"[border-color:var(--n-line-hover)]",current:"[border-color:var(--neba-border)]",upcoming:"[border-color:var(--neba-border)]"},w={complete:"text-(--neba-fg)",current:"text-(--n-accent)",upcoming:"text-(--neba-muted-fg)"};export const TimelineItem=r.forwardRef(function({title:t,meta:c,bullet:_,status:z,color:C,connector:$="solid",className:j,children:P,...R},T){const k=r.useContext(u),{index:A,last:I}=r.useContext(b),M=k?.size??"md",q=k?.density??"default",B=k?.orientation??"vertical",D=C??k?.color??"primary",E=k?.active??null,F=z??(null===E?"upcoming":A<E?"complete":A===E?"current":"upcoming"),G="horizontal"===B,H="none"!==$&&!I,J=e("span",{"aria-hidden":"true",className:n("relative z-10 flex shrink-0 items-center justify-center rounded-full","size-(--n-bullet) text-[calc(var(--n-bullet)*0.5)] leading-none font-semibold tabular-nums",y[F],p,o),children:_}),K=H?e("span",{"aria-hidden":"true",className:n("pointer-events-none absolute",G?"top-[calc(var(--n-bullet)/2_-_1px)] start-(--n-bullet) end-0 border-t-2":"start-[calc(var(--n-bullet)/2_-_1px)] top-(--n-bullet) bottom-0 border-s-2",h[$],N[F],p)}):null,L=l("div",{className:n("flex min-w-0 flex-col gap-0.5",G?"mt-2":""),children:[a(t)||a(c)?l("div",{className:"flex flex-wrap items-baseline gap-x-2",children:[a(t)?e("span",{className:n("font-semibold",d[M],w[F],p),children:t}):null,a(c)?e("span",{className:n("text-(--neba-muted-fg)",s[M]),children:c}):null]}):null,a(P)?e("div",{className:n("text-(--neba-muted-fg)",i[M]),children:P}):null]});return l("li",{ref:T,"aria-current":"current"===F?"step":void 0,"data-status":F,className:n("relative",G?n("flex min-w-0 flex-1 flex-col",I?"":g[q][M]):n("flex",f[M],I?"":v[q][M]),j),style:{"--n-bullet":x[M],...m(D,0),"--n-fill":`var(--neba-${D}-fill)`,"--n-on-solid":`var(--neba-${D}-on-solid)`},...R,children:[K,J,L]})});export const Timeline=r.forwardRef(function({active:l,size:a="md",color:o="primary",density:s="default",orientation:i="vertical",render:d,className:c,style:p,children:x,...f},v){const g=r.Children.toArray(x),h=g.length,y=r.useMemo(()=>({size:a,density:s,orientation:i,color:o,active:l??null}),[a,s,i,o,l]),N=t({render:d??e("ol",{}),ref:v,props:{role:"list",className:n("flex","horizontal"===i?"flex-row":"flex-col",c),style:{...m(o,0),...p},children:g.map((l,r)=>e(b.Provider,{value:{index:r,last:r===h-1},children:l},r)),...f}});return e(u.Provider,{value:y,children:N})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{Timeline,TimelineItem}from"./Timeline";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { NebaElevation, NebaPosition, NebaStyleProps } from '../../types';
|
|
4
|
+
export interface ToolbarProps extends NebaStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
|
|
5
|
+
/**
|
|
6
|
+
* Drop shadow depth. `0` — the default — is flat even when the bar is pinned:
|
|
7
|
+
* a shadow under a header is a way of saying "there is content beneath this",
|
|
8
|
+
* and that is only true once the page has been scrolled. Raise it yourself, or
|
|
9
|
+
* leave it flat and turn on `divider`.
|
|
10
|
+
* @default 0
|
|
11
|
+
*/
|
|
12
|
+
elevation?: NebaElevation;
|
|
13
|
+
/**
|
|
14
|
+
* How the bar sits in the page's scroll.
|
|
15
|
+
*
|
|
16
|
+
* - `static` — in the flow, scrolling away with the content.
|
|
17
|
+
* - `sticky` — in the flow until it reaches the edge, then held there. What an
|
|
18
|
+
* application header usually wants: it takes up its own space, so nothing
|
|
19
|
+
* underneath has to be padded around it.
|
|
20
|
+
* - `fixed` — out of the flow entirely. The page needs padding of its own, or
|
|
21
|
+
* the first screenful sits behind the bar.
|
|
22
|
+
* @default 'static'
|
|
23
|
+
*/
|
|
24
|
+
position?: NebaPosition;
|
|
25
|
+
/** Which edge it is held against when `position` is not `static`. @default 'top' */
|
|
26
|
+
side?: 'top' | 'bottom';
|
|
27
|
+
/**
|
|
28
|
+
* Draws a hairline along the edge that faces the content — under a `top` bar,
|
|
29
|
+
* over a `bottom` one.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
divider?: boolean;
|
|
33
|
+
/** Pinned to the start of the bar: a logo, a title, a back button. */
|
|
34
|
+
start?: React.ReactNode;
|
|
35
|
+
/** Pinned to the end: the actions. */
|
|
36
|
+
end?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Renders something other than a `<div>` — `render={<header />}`,
|
|
39
|
+
* `render={<nav />}`. Base UI's own escape hatch, and worth reaching for here:
|
|
40
|
+
* a page's header should be a `<header>`.
|
|
41
|
+
*/
|
|
42
|
+
render?: useRender.RenderProp;
|
|
43
|
+
/** The middle. Takes whatever width `start` and `end` leave. */
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A bar of controls: an application header, a page's action row, the strip along
|
|
48
|
+
* the bottom of an editor.
|
|
49
|
+
*
|
|
50
|
+
* Three slots and a row. `start` and `end` are pinned to their ends and
|
|
51
|
+
* `children` takes what is left, which is the arrangement every toolbar has ever
|
|
52
|
+
* had — so it is laid out here rather than left to a caller and a spacer `<div>`
|
|
53
|
+
* they have to remember.
|
|
54
|
+
*
|
|
55
|
+
* The one thing it does not do is take a height. A toolbar is as tall as the
|
|
56
|
+
* controls in it plus its padding, and that padding is the `size`/`density` pair
|
|
57
|
+
* every other surface uses — so `density="compact"` gives the dense bar without
|
|
58
|
+
* a second prop meaning the same thing, and without the type scale moving.
|
|
59
|
+
*
|
|
60
|
+
* It has no `role="toolbar"`, deliberately. That role is a promise about
|
|
61
|
+
* keyboard behaviour — one tab stop for the whole bar, arrow keys between the
|
|
62
|
+
* controls in it — and a bar that claims it without implementing it is worse for
|
|
63
|
+
* a keyboard reader than one that never claimed anything. What a header wants is
|
|
64
|
+
* `render={<header />}`; what a genuine roving-focus toolbar wants is a
|
|
65
|
+
* ButtonGroup, which is one.
|
|
66
|
+
*/
|
|
67
|
+
export declare const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as o from"react";import{useRender as n}from"@base-ui/react/use-render";import{boxPaddingXClasses as i,boxPaddingYClasses as a}from"../box/Box";import{hasContent as s,radiusClasses as l,sheetSectionGapClasses as d,surfaceClasses as m,surfaceSlots as c,transitionClasses as b}from"../../internal/styles";const p={solid:[m,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[m,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},f={static:{top:"",bottom:""},sticky:{top:"sticky top-0 z-20",bottom:"sticky bottom-0 z-20"},fixed:{top:"fixed inset-x-0 top-0 z-30",bottom:"fixed inset-x-0 bottom-0 z-30"}},x={top:"border-b [border-color:var(--n-line)]",bottom:"border-t [border-color:var(--n-line)]"};export const Toolbar=o.forwardRef(function({variant:o="outline",size:m="md",color:v="primary",density:g="default",elevation:h=0,position:u="static",side:w="top",divider:y=!1,start:j,end:k,render:z,className:N,style:B,children:F,...R},T){const q=["flex w-full min-w-0 items-center",i[g][m],a[g][m],d[m],"static"===u?l[m]:"",p[o],y?x[w]:"",f[u][w],b,N??""].filter(Boolean).join(" ");return n({render:z,ref:T,props:{className:q,style:{...c(v,h),...B},children:r(t,{children:[s(j)?e("div",{className:"flex min-w-0 shrink-0 items-center gap-2",children:j}):null,e("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:F}),s(k)?e("div",{className:"flex min-w-0 shrink-0 items-center gap-2",children:k}):null]}),...R}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{Toolbar}from"./Toolbar";
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { NebaElevation, NebaStyleProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* How the hierarchy is drawn.
|
|
5
|
+
*
|
|
6
|
+
* - `none` — indentation only. The quietest, and usually right for a navigation
|
|
7
|
+
* sidebar, where the tree is two levels deep and the labels say what the
|
|
8
|
+
* structure is.
|
|
9
|
+
* - `simple` — one hairline rail per level, running the full height of the
|
|
10
|
+
* group. Enough to follow a column of rows back to the branch it belongs to.
|
|
11
|
+
* - `folder` — the rail plus an elbow into every row, and the rail under a last
|
|
12
|
+
* child stops at that row. The file-manager drawing, and the one to reach for
|
|
13
|
+
* when the tree is deep.
|
|
14
|
+
*/
|
|
15
|
+
export type TreeViewLines = 'none' | 'simple' | 'folder';
|
|
16
|
+
/** A row's identity, and what `expanded` and `selected` are lists of. */
|
|
17
|
+
export type TreeViewValue = string | number;
|
|
18
|
+
export interface TreeViewProps extends NebaStyleProps, Omit<React.ComponentPropsWithoutRef<'ul'>, 'color' | 'defaultValue' | 'onSelect'> {
|
|
19
|
+
/**
|
|
20
|
+
* Drop shadow depth. `0` (the default) is flat.
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
elevation?: NebaElevation;
|
|
24
|
+
/**
|
|
25
|
+
* How the hierarchy is drawn between the rows.
|
|
26
|
+
* @default 'simple'
|
|
27
|
+
*/
|
|
28
|
+
lines?: TreeViewLines;
|
|
29
|
+
/** Which branches are open. Use with `onExpandedChange` for a controlled tree. */
|
|
30
|
+
expanded?: TreeViewValue[];
|
|
31
|
+
/** Which start open, for an uncontrolled one. */
|
|
32
|
+
defaultExpanded?: TreeViewValue[];
|
|
33
|
+
onExpandedChange?: (expanded: TreeViewValue[]) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Which rows are chosen. An array even when only one row may be chosen at a
|
|
36
|
+
* time — the same shape Accordion's `value` takes, so turning `multiple` on
|
|
37
|
+
* does not also change the type of the value.
|
|
38
|
+
*/
|
|
39
|
+
selected?: TreeViewValue[];
|
|
40
|
+
/** Which start chosen, for an uncontrolled one. */
|
|
41
|
+
defaultSelected?: TreeViewValue[];
|
|
42
|
+
onSelectedChange?: (selected: TreeViewValue[]) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Whether more than one row may be chosen at a time.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
multiple?: boolean;
|
|
48
|
+
/** Unavailable. Every row stops answering. */
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
/** The name the tree is announced by. */
|
|
51
|
+
label?: string;
|
|
52
|
+
/** The top-level TreeItems. */
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
export interface TreeItemProps extends Omit<React.ComponentPropsWithoutRef<'li'>, 'color' | 'onClick'> {
|
|
56
|
+
/**
|
|
57
|
+
* Identifies the row to `expanded` and `selected`. One is generated when it is
|
|
58
|
+
* left out, which is fine for a tree nobody drives from code.
|
|
59
|
+
*/
|
|
60
|
+
value?: TreeViewValue;
|
|
61
|
+
/**
|
|
62
|
+
* The row's text. Its own prop rather than `children`, because in a tree the
|
|
63
|
+
* children are the rows underneath it.
|
|
64
|
+
*/
|
|
65
|
+
label?: React.ReactNode;
|
|
66
|
+
/** Content before the label — a folder glyph, a file type, a status dot. */
|
|
67
|
+
startIcon?: React.ReactNode;
|
|
68
|
+
/** Content after the label, inside the pressable area — a count, a badge. */
|
|
69
|
+
endIcon?: React.ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* A control pinned to the end of the row.
|
|
72
|
+
*
|
|
73
|
+
* Deliberately outside the pressable area, the same shape ListItem uses: a
|
|
74
|
+
* row that both opens and holds a menu button has two things to press.
|
|
75
|
+
*/
|
|
76
|
+
action?: React.ReactNode;
|
|
77
|
+
/** Renders the row as a link, for a tree that is navigation. */
|
|
78
|
+
href?: string;
|
|
79
|
+
/** Fires when the row is pressed, before it opens or is chosen. */
|
|
80
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
81
|
+
/**
|
|
82
|
+
* Forces the disclosure arrow onto a row with no children yet — the branch
|
|
83
|
+
* that is fetched the first time it is opened.
|
|
84
|
+
*/
|
|
85
|
+
expandable?: boolean;
|
|
86
|
+
/** Unavailable. Its branch, if it is open, keeps working. */
|
|
87
|
+
disabled?: boolean;
|
|
88
|
+
/** The rows underneath this one. */
|
|
89
|
+
children?: React.ReactNode;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A tree of rows that open and shut.
|
|
93
|
+
*
|
|
94
|
+
* There is no Base UI primitive under this: the library has no tree, and the
|
|
95
|
+
* three things a tree owes — the `tree`/`treeitem`/`group` roles, one tab stop
|
|
96
|
+
* for the whole widget, and the arrow keys that walk it — are most of the
|
|
97
|
+
* component.
|
|
98
|
+
*
|
|
99
|
+
* The keyboard is handled once, here, rather than on every row. A tree's arrow
|
|
100
|
+
* keys are questions about the *tree* ("what is the next visible row", "where is
|
|
101
|
+
* my parent"), and the only element that can answer them is the one holding all
|
|
102
|
+
* of them. The rows the query returns are in document order, which is reading
|
|
103
|
+
* order, because a shut branch is unmounted rather than hidden.
|
|
104
|
+
*/
|
|
105
|
+
export declare const TreeView: React.ForwardRefExoticComponent<TreeViewProps & React.RefAttributes<HTMLUListElement>>;
|
|
106
|
+
/**
|
|
107
|
+
* One row, and everything under it.
|
|
108
|
+
*
|
|
109
|
+
* The `<li>` is the `treeitem` and it is what takes focus — not the row drawn
|
|
110
|
+
* inside it. That is the ARIA pattern, and it is also why the disclosure arrow
|
|
111
|
+
* is a plain span with a click handler rather than a button: a button inside the
|
|
112
|
+
* focusable row would be a second tab stop in a widget that is supposed to have
|
|
113
|
+
* exactly one, and the keyboard already opens a branch with ArrowRight.
|
|
114
|
+
*/
|
|
115
|
+
export declare const TreeItem: React.ForwardRefExoticComponent<TreeItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as n from"react";import{ChevronIcon as a}from"../../internal/icons";import{controlTextClasses as l,cx as s,gapClasses as o,hasContent as i,iconClasses as c,radiusClasses as d,surfaceClasses as u,surfaceSlots as m,transitionClasses as f}from"../../internal/styles";const p=n.createContext({size:"md",density:"default",disabled:!1,expandedKeys:new Set,selectedKeys:new Set,activeKey:null,toggle:()=>{},select:()=>{},activate:()=>{},register:()=>()=>{}}),x={solid:[u,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[u,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},g={xs:"0.875rem",sm:"1rem",md:"1.25rem",lg:"1.5rem",xl:"1.75rem"},b={xs:"1.375rem",sm:"1.625rem",md:"2rem",lg:"2.5rem",xl:"3rem"},h={default:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-3.5"},compact:{xs:"px-1",sm:"px-1",md:"px-1.5",lg:"px-2",xl:"px-2.5"}},v={xs:"rounded-[0.3125rem]",sm:"rounded-[0.375rem]",md:"rounded-[0.5rem]",lg:"rounded-[0.625rem]",xl:"rounded-[0.75rem]"},y={none:"",simple:"neba-tree-simple",folder:"neba-tree-folder"};function w(e){return Array.from(e.querySelectorAll('[role="treeitem"]'))}const k=e=>String(e);export const TreeView=n.forwardRef(function({variant:t="outline",size:r="md",color:a="primary",density:l="default",elevation:o=0,lines:i="simple",expanded:c,defaultExpanded:u,onExpandedChange:h,selected:v,defaultSelected:C,onSelectedChange:N,multiple:S=!1,disabled:K=!1,label:A,className:D,style:R,children:E,onKeyDown:j,...I},P){const[V,z]=n.useState(u??[]),[_,O]=n.useState(C??[]),[J,L]=n.useState(null),M=c??V,T=v??_,q=n.useRef(null),F=n.useCallback(e=>{q.current=e,"function"==typeof P?P(e):P&&(P.current=e)},[P]),H=n.useCallback(e=>{const t=k(e),r=c??V,n=r.some(e=>k(e)===t)?r.filter(e=>k(e)!==t):[...r,e];void 0===c&&z(n),h?.(n)},[c,V,h]),U=n.useCallback(e=>{const t=k(e),r=v??_,n=r.some(e=>k(e)===t),a=S?n?r.filter(e=>k(e)!==t):[...r,e]:[e];void 0===v&&O(a),N?.(a)},[S,v,_,N]),B=n.useRef(new Map),G=n.useCallback((e,t)=>(B.current.set(e,t),()=>{B.current.delete(e)}),[]),Q=JSON.stringify(M.map(k)),W=JSON.stringify(T.map(k)),X=n.useMemo(()=>({size:r,density:l,disabled:K,expandedKeys:new Set(M.map(k)),selectedKeys:new Set(T.map(k)),activeKey:J,toggle:H,select:U,activate:L,register:G}),[r,l,K,Q,W,J,H,U,G]);n.useEffect(()=>{const e=q.current;if(!e)return;const t=w(e);0!==t.length&&(null!==J&&t.some(e=>e.dataset.nebaValue===J)||L(t[0].dataset.nebaValue??null))});const Y=s("flex list-none flex-col p-1",d[r],x[t],f,y[i],D);return e(p.Provider,{value:X,children:e("ul",{ref:F,role:"tree","aria-label":A,"aria-multiselectable":S||void 0,className:Y,style:{...m(a,o),"--n-tree-indent":g[r],"--n-tree-row":b[r],...R},onKeyDown:function(e){if(j?.(e),e.defaultPrevented)return;const t=q.current,r=e.target?.closest?.('[role="treeitem"]');if(!t||!r||!t.contains(r))return;const n=w(t),a=n.indexOf(r);if(-1===a)return;const l=t=>{t&&(e.preventDefault(),L(t.dataset.nebaValue??null),t.focus())},s=e=>{const t=e.dataset.nebaValue;t&&B.current.get(t)?.toggle()},o="rtl"===getComputedStyle(t).direction,i=o?"ArrowLeft":"ArrowRight",c=o?"ArrowRight":"ArrowLeft",d=r.getAttribute("aria-expanded");switch(e.key){case"ArrowDown":l(n[a+1]);break;case"ArrowUp":l(n[a-1]);break;case"Home":l(n[0]);break;case"End":l(n[n.length-1]);break;case i:"false"===d?(e.preventDefault(),s(r)):"true"===d&&l(n[a+1]);break;case c:"true"===d?(e.preventDefault(),s(r)):l(r.parentElement?.closest('[role="treeitem"]'));break;case"Enter":case" ":e.preventDefault(),r.click()}},...I,children:E})})});export const TreeItem=n.forwardRef(function({value:d,label:u,startIcon:m,endIcon:x,action:g,href:b,expandable:y,disabled:w=!1,className:C,children:N,onClick:S,...K},A){const{size:D,density:R,disabled:E,expandedKeys:j,selectedKeys:I,activeKey:P,toggle:V,select:z,activate:_,register:O}=n.useContext(p),J=n.useId(),L=d??J,M=k(L),T=n.useRef(null),q=n.useCallback(e=>{T.current=e,"function"==typeof A?A(e):A&&(A.current=e)},[A]),F=n.Children.toArray(N),H=y??F.length>0,U=H&&j.has(M),B=I.has(M),G=w||E,Q=n.useRef({toggle:()=>{}});Q.current.toggle=()=>{!G&&H&&V(L)},n.useEffect(()=>O(M,Q.current),[M,O]);const W=s("flex min-w-0 flex-1 cursor-pointer items-center text-start","h-(--n-tree-row)",h[R][D],v[D],o[D],l[D],f,c,"group-focus-visible/tree-item:[outline:2px_solid_var(--n-ring)]","group-focus-visible/tree-item:outline-offset-[-2px]",G?"cursor-not-allowed text-(--neba-disabled-fg)":B?"bg-(--n-soft-press) font-medium text-(--n-accent) hover:bg-(--n-soft-press)":"hover:bg-(--n-soft)"),X=r(t,{children:[e("span",{"aria-hidden":"true",onClick:e=>{!G&&H&&(e.stopPropagation(),e.preventDefault(),T.current?.focus(),_(M),V(L))},className:s("flex h-[1lh] w-[1.15em] shrink-0 items-center justify-center","[transition:rotate_var(--neba-duration)_var(--neba-ease)]",H?"text-(--neba-muted-fg)":"",U?"rotate-0":"-rotate-90 rtl:rotate-90"),children:H?e(a,{}):null}),i(m)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:m}):null,e("span",{className:"min-w-0 flex-1 truncate",children:u}),i(x)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:x}):null]});return r("li",{ref:q,role:"treeitem","aria-expanded":H?U:void 0,"aria-selected":!!B||void 0,"aria-disabled":G||void 0,"data-neba-value":M,tabIndex:P===M?0:-1,className:s("group/tree-item relative block [outline:none]",C),onClick:function(e){e.stopPropagation(),G?e.preventDefault():(T.current?.focus(),_(M),S?.(e),e.defaultPrevented||(H&&V(L),z(L)))},...K,children:[r("div",{className:"flex w-full items-center",children:[b&&!G?e("a",{href:b,tabIndex:-1,className:W,"aria-current":B?"page":void 0,children:X}):e("div",{className:W,children:X}),i(g)?e("span",{className:s("flex shrink-0 items-center",h[R][D]),onClick:e=>e.stopPropagation(),children:g}):null]}),H&&U&&F.length>0?e("ul",{role:"group",className:"list-none ps-(--n-tree-indent)",children:N}):null]})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{TreeItem,TreeView}from"./TreeView";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,58 @@
|
|
|
1
1
|
export * from './types';
|
|
2
2
|
export * from './components/accordion';
|
|
3
3
|
export * from './components/alert';
|
|
4
|
+
export * from './components/avatar';
|
|
4
5
|
export * from './components/badge';
|
|
6
|
+
export * from './components/blockquote';
|
|
5
7
|
export * from './components/box';
|
|
8
|
+
export * from './components/breadcrumb';
|
|
6
9
|
export * from './components/button';
|
|
7
10
|
export * from './components/button-group';
|
|
8
11
|
export * from './components/card';
|
|
12
|
+
export * from './components/carousel';
|
|
13
|
+
export * from './components/chat-bubble';
|
|
9
14
|
export * from './components/checkbox';
|
|
10
15
|
export * from './components/chip';
|
|
11
16
|
export * from './components/combobox';
|
|
17
|
+
export * from './components/container';
|
|
18
|
+
export * from './components/date-picker';
|
|
19
|
+
export * from './components/date-range-picker';
|
|
20
|
+
export * from './components/date-time-picker';
|
|
12
21
|
export * from './components/dialog';
|
|
13
22
|
export * from './components/divider';
|
|
14
23
|
export * from './components/file-picker';
|
|
24
|
+
export * from './components/grid';
|
|
25
|
+
export * from './components/grid-container';
|
|
26
|
+
export * from './components/highlight';
|
|
27
|
+
export * from './components/icon';
|
|
28
|
+
export * from './components/icon-button';
|
|
15
29
|
export * from './components/list';
|
|
16
30
|
export * from './components/menu';
|
|
17
31
|
export * from './components/number-field';
|
|
32
|
+
export * from './components/otp-field';
|
|
18
33
|
export * from './components/overlay';
|
|
19
34
|
export * from './components/pagination';
|
|
35
|
+
export * from './components/panes';
|
|
36
|
+
export * from './components/pill';
|
|
20
37
|
export * from './components/progress-box';
|
|
21
38
|
export * from './components/progress-circular';
|
|
22
39
|
export * from './components/progress-linear';
|
|
23
40
|
export * from './components/radio-group';
|
|
41
|
+
export * from './components/segmented-button';
|
|
24
42
|
export * from './components/select';
|
|
43
|
+
export * from './components/shortcut';
|
|
25
44
|
export * from './components/slider';
|
|
45
|
+
export * from './components/spoiler';
|
|
46
|
+
export * from './components/statistic';
|
|
26
47
|
export * from './components/switch';
|
|
27
48
|
export * from './components/table';
|
|
28
49
|
export * from './components/tabs';
|
|
29
50
|
export * from './components/text-field';
|
|
51
|
+
export * from './components/text-link';
|
|
52
|
+
export * from './components/time-picker';
|
|
53
|
+
export * from './components/timeline';
|
|
30
54
|
export * from './components/toast';
|
|
55
|
+
export * from './components/toolbar';
|
|
31
56
|
export * from './components/tooltip';
|
|
57
|
+
export * from './components/tree-view';
|
|
32
58
|
export * from './components/typography';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./types";export*from"./components/accordion";export*from"./components/alert";export*from"./components/badge";export*from"./components/box";export*from"./components/button";export*from"./components/button-group";export*from"./components/card";export*from"./components/checkbox";export*from"./components/chip";export*from"./components/combobox";export*from"./components/dialog";export*from"./components/divider";export*from"./components/file-picker";export*from"./components/list";export*from"./components/menu";export*from"./components/number-field";export*from"./components/overlay";export*from"./components/pagination";export*from"./components/progress-box";export*from"./components/progress-circular";export*from"./components/progress-linear";export*from"./components/radio-group";export*from"./components/select";export*from"./components/slider";export*from"./components/switch";export*from"./components/table";export*from"./components/tabs";export*from"./components/text-field";export*from"./components/toast";export*from"./components/tooltip";export*from"./components/typography";
|
|
1
|
+
export*from"./types";export*from"./components/accordion";export*from"./components/alert";export*from"./components/avatar";export*from"./components/badge";export*from"./components/blockquote";export*from"./components/box";export*from"./components/breadcrumb";export*from"./components/button";export*from"./components/button-group";export*from"./components/card";export*from"./components/carousel";export*from"./components/chat-bubble";export*from"./components/checkbox";export*from"./components/chip";export*from"./components/combobox";export*from"./components/container";export*from"./components/date-picker";export*from"./components/date-range-picker";export*from"./components/date-time-picker";export*from"./components/dialog";export*from"./components/divider";export*from"./components/file-picker";export*from"./components/grid";export*from"./components/grid-container";export*from"./components/highlight";export*from"./components/icon";export*from"./components/icon-button";export*from"./components/list";export*from"./components/menu";export*from"./components/number-field";export*from"./components/otp-field";export*from"./components/overlay";export*from"./components/pagination";export*from"./components/panes";export*from"./components/pill";export*from"./components/progress-box";export*from"./components/progress-circular";export*from"./components/progress-linear";export*from"./components/radio-group";export*from"./components/segmented-button";export*from"./components/select";export*from"./components/shortcut";export*from"./components/slider";export*from"./components/spoiler";export*from"./components/statistic";export*from"./components/switch";export*from"./components/table";export*from"./components/tabs";export*from"./components/text-field";export*from"./components/text-link";export*from"./components/time-picker";export*from"./components/timeline";export*from"./components/toast";export*from"./components/toolbar";export*from"./components/tooltip";export*from"./components/tree-view";export*from"./components/typography";
|