@a-type/ui 4.0.0-beta.7 → 4.0.0-beta.9
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/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.stories.d.ts +18 -0
- package/dist/cjs/components/avatar/Avatar.stories.js +38 -0
- package/dist/cjs/components/avatar/Avatar.stories.js.map +1 -0
- package/dist/cjs/components/collapsible/Collapsible.d.ts +2 -0
- package/dist/cjs/components/collapsible/Collapsible.js +3 -1
- package/dist/cjs/components/collapsible/Collapsible.js.map +1 -1
- package/dist/cjs/components/popover/Popover.d.ts +1 -3
- package/dist/cjs/components/popover/Popover.js +1 -4
- package/dist/cjs/components/popover/Popover.js.map +1 -1
- package/dist/cjs/components/popover/Popover.stories.d.ts +0 -1
- package/dist/cjs/components/popover/Popover.stories.js +1 -6
- package/dist/cjs/components/popover/Popover.stories.js.map +1 -1
- package/dist/cjs/components/slider/Slider.d.ts +4 -4
- package/dist/cjs/components/slider/Slider.js +1 -1
- package/dist/cjs/components/slider/Slider.js.map +1 -1
- package/dist/cjs/components/slider/Slider.stories.d.ts +2 -2
- package/dist/cjs/components/tabs/tabs.js +1 -1
- package/dist/cjs/components/tabs/tabs.js.map +1 -1
- package/dist/css/main.css +1 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/avatar/Avatar.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.stories.d.ts +18 -0
- package/dist/esm/components/avatar/Avatar.stories.js +35 -0
- package/dist/esm/components/avatar/Avatar.stories.js.map +1 -0
- package/dist/esm/components/collapsible/Collapsible.d.ts +2 -0
- package/dist/esm/components/collapsible/Collapsible.js +2 -0
- package/dist/esm/components/collapsible/Collapsible.js.map +1 -1
- package/dist/esm/components/popover/Popover.d.ts +1 -3
- package/dist/esm/components/popover/Popover.js +0 -2
- package/dist/esm/components/popover/Popover.js.map +1 -1
- package/dist/esm/components/popover/Popover.stories.d.ts +0 -1
- package/dist/esm/components/popover/Popover.stories.js +0 -5
- package/dist/esm/components/popover/Popover.stories.js.map +1 -1
- package/dist/esm/components/slider/Slider.d.ts +4 -4
- package/dist/esm/components/slider/Slider.js +1 -1
- package/dist/esm/components/slider/Slider.js.map +1 -1
- package/dist/esm/components/slider/Slider.stories.d.ts +2 -2
- package/dist/esm/components/tabs/tabs.js +1 -1
- package/dist/esm/components/tabs/tabs.js.map +1 -1
- package/package.json +1 -1
- package/src/components/avatar/Avatar.stories.tsx +41 -0
- package/src/components/avatar/Avatar.tsx +8 -6
- package/src/components/collapsible/Collapsible.tsx +7 -0
- package/src/components/popover/Popover.stories.tsx +0 -19
- package/src/components/popover/Popover.tsx +0 -5
- package/src/components/slider/Slider.tsx +4 -1
- package/src/components/tabs/tabs.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.js","sourceRoot":"","sources":["../../../../src/components/collapsible/Collapsible.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;AACb,OAAO,EACN,WAAW,IAAI,eAAe,GAG9B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC;AACpD,MAAM,sBAAsB,GAAG,aAAa,CAC3C,eAAe,CAAC,KAAK,EACrB,gCAAgC,EAChC,gGAAgG,EAChG,4EAA4E,EAC5E,6CAA6C,EAC7C,6CAA6C,EAC7C,2CAA2C,EAC3C,2CAA2C,EAC3C,+CAA+C,EAC/C,6CAA6C,EAC7C,wDAAwD,CACxD,CAAC;AACF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,kBAAkB,CAAC,EAS7D;QAT6D,EAC7D,GAAG,EACH,UAAU,EACV,IAAI,OAMJ,EALG,KAAK,cA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DAAmD,CACnD,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IACzD,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,kBAAkB;IAC3B,MAAM,EAAE,iBAAiB;IACzB,IAAI,EAAE,eAAe;CACrB,CAAC,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { PopoverPopupProps, PopoverPositionerProps, Popover as PopoverPrimitive
|
|
1
|
+
import { PopoverPopupProps, PopoverPositionerProps, Popover as PopoverPrimitive } from '@base-ui/react/popover';
|
|
2
2
|
import { MenuArrowProps } from '@base-ui/react/menu';
|
|
3
3
|
import { Ref } from 'react';
|
|
4
4
|
export declare const PopoverRoot: typeof PopoverPrimitive.Root;
|
|
5
5
|
export declare const PopoverTrigger: PopoverPrimitive.Trigger;
|
|
6
6
|
export declare const PopoverArrow: import("react").FunctionComponent<MenuArrowProps>;
|
|
7
7
|
export declare const PopoverClose: import("react").FunctionComponent<import("@base-ui/react/popover").PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
export declare const PopoverAnchor: (props: PopoverTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export declare const PopoverContent: ({ ref, children, forceMount, disableBlur, className, radius, padding, align, alignOffset, side, sideOffset, anchor, disableAnchorTracking, sticky, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, positionMethod, ...props }: PopoverPopupProps & PopoverPositionerProps & {
|
|
10
9
|
radius?: "none" | "default" | "md";
|
|
11
10
|
padding?: "none" | "default";
|
|
@@ -26,7 +25,6 @@ export declare const Popover: typeof PopoverPrimitive.Root & {
|
|
|
26
25
|
Arrow: import("react").FunctionComponent<MenuArrowProps>;
|
|
27
26
|
Close: import("react").FunctionComponent<import("@base-ui/react/popover").PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
28
27
|
Trigger: PopoverPrimitive.Trigger;
|
|
29
|
-
Anchor: (props: PopoverTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
28
|
Title: import("react").FunctionComponent<import("@base-ui/react/popover").PopoverTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
31
29
|
Description: import("react").FunctionComponent<import("@base-ui/react/popover").PopoverDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
32
30
|
createHandle: typeof PopoverPrimitive.createHandle;
|
|
@@ -24,7 +24,6 @@ export const PopoverRoot = PopoverPrimitive.Root;
|
|
|
24
24
|
export const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
25
25
|
export const PopoverArrow = StyledArrow;
|
|
26
26
|
export const PopoverClose = StyledClose;
|
|
27
|
-
export const PopoverAnchor = (props) => (_jsx(PopoverTrigger, Object.assign({}, props, { disabled: true })));
|
|
28
27
|
export const PopoverContent = function PopoverContent(_a) {
|
|
29
28
|
var { ref, children, forceMount, disableBlur, className, radius = 'default', padding = 'default', align, alignOffset, side, sideOffset = 8, anchor, disableAnchorTracking, sticky, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, positionMethod } = _a, props = __rest(_a, ["ref", "children", "forceMount", "disableBlur", "className", "radius", "padding", "align", "alignOffset", "side", "sideOffset", "anchor", "disableAnchorTracking", "sticky", "arrowPadding", "collisionAvoidance", "collisionBoundary", "collisionPadding", "positionMethod"]);
|
|
30
29
|
return (_jsx(PopoverPrimitive.Portal, { keepMounted: forceMount, children: _jsx(GroupScaleReset, { children: _jsx(PopoverPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, disableAnchorTracking: disableAnchorTracking, sticky: sticky, arrowPadding: arrowPadding, collisionAvoidance: collisionAvoidance, collisionBoundary: collisionBoundary, collisionPadding: collisionPadding, positionMethod: positionMethod, children: _jsx(StyledContent, Object.assign({}, props, { ref: ref, className: classNames({
|
|
@@ -42,7 +41,6 @@ export const Popover = Object.assign(PopoverRoot, {
|
|
|
42
41
|
Arrow: PopoverArrow,
|
|
43
42
|
Close: PopoverClose,
|
|
44
43
|
Trigger: PopoverTrigger,
|
|
45
|
-
Anchor: PopoverAnchor,
|
|
46
44
|
Title: PopoverTitle,
|
|
47
45
|
Description: PopoverDescription,
|
|
48
46
|
createHandle: PopoverPrimitive.createHandle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../src/components/popover/Popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAGN,OAAO,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../src/components/popover/Popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAGN,OAAO,IAAI,gBAAgB,GAC3B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,UAAU,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,aAAa,GAAG,aAAa,CAClC,gBAAgB,CAAC,KAAK,EACtB,wGAAwG,EACxG,uBAAuB,EACvB,6DAA6D,EAC7D,6EAA6E,EAC7E,2EAA2E,EAC3E,yCAAyC,EACzC,yEAAyE,EACzE,kEAAkE,CAClE,CAAC;AAEF,MAAM,WAAW,GAAG,aAAa,CAChC,CAAC,KAAqB,EAAE,EAAE,CAAC,CAC1B,KAAC,gBAAgB,CAAC,KAAK,oBAAK,KAAK,cAChC,KAAC,QAAQ,KAAG,IACY,CACzB,EACD,0BAA0B,EAC1B,oDAAoD,EACpD,sDAAsD,CACtD,CAAC;AAEF,MAAM,WAAW,GAAG,aAAa,CAChC,gBAAgB,CAAC,KAAK,EACtB,4MAA4M,CAC5M,CAAC;AAEF,UAAU;AACV,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CA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AE,MAAM,KAAK,IAAI;qBAC5C,EACD,SAAS,CACT,YAEA,QAAQ,IACM,GACa,GACb,GACO,CAC1B,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CACxC,gBAAgB,CAAC,KAAK,EACtB,oDAAoD,CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAC9C,gBAAgB,CAAC,WAAW,EAC5B,+CAA+C,CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IACjD,OAAO,EAAE,cAAc;IACvB,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;IACvB,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,kBAAkB;IAC/B,YAAY,EAAE,gBAAgB,CAAC,YAAY;CAC3C,CAAC,CAAC"}
|
|
@@ -16,9 +16,4 @@ export const Default = {
|
|
|
16
16
|
return (_jsxs(Popover, Object.assign({}, args, { children: [_jsx(Popover.Trigger, { render: _jsx(Button, { color: "primary", size: "small" }), children: "Open Popover" }), _jsxs(Popover.Content, { className: "p-md", children: [_jsx(Popover.Arrow, {}), _jsx(Popover.Title, { children: "Hello" }), _jsx(Popover.Description, { children: "This is a popover content." })] })] })));
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
|
-
export const Anchored = {
|
|
20
|
-
render(args) {
|
|
21
|
-
return (_jsx("div", { className: "layer-components:relative layer-components:h-[200px] layer-components:flex layer-components:items-center layer-components:justify-center", children: _jsxs(Popover, Object.assign({ open: true }, args, { children: [_jsx(Popover.Anchor, { children: "Anchor" }), _jsxs(Popover.Content, { className: "p-md", children: [_jsx(Popover.Arrow, {}), _jsx(Popover.Title, { children: "Hello" }), _jsx(Popover.Description, { children: "This is a popover content anchored to the center of the container." })] })] })) }));
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
19
|
//# sourceMappingURL=Popover.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.stories.js","sourceRoot":"","sources":["../../../../src/components/popover/Popover.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,IAAI,GAAS;IAClB,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE;QACX,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC5B;CACD,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC7B,MAAM,CAAC,IAAI;QACV,OAAO,CACN,MAAC,OAAO,oBAAK,IAAI,eAChB,KAAC,OAAO,CAAC,OAAO,IAAC,MAAM,EAAE,KAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,GAAG,6BAE9C,EAClB,MAAC,OAAO,CAAC,OAAO,IAAC,SAAS,EAAC,MAAM,aAChC,KAAC,OAAO,CAAC,KAAK,KAAG,EACjB,KAAC,OAAO,CAAC,KAAK,wBAAsB,EACpC,KAAC,OAAO,CAAC,WAAW,6CAAiD,IACpD,KACT,CACV,CAAC;IACH,CAAC;CACD,CAAC
|
|
1
|
+
{"version":3,"file":"Popover.stories.js","sourceRoot":"","sources":["../../../../src/components/popover/Popover.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,IAAI,GAAS;IAClB,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE;QACX,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC5B;CACD,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC7B,MAAM,CAAC,IAAI;QACV,OAAO,CACN,MAAC,OAAO,oBAAK,IAAI,eAChB,KAAC,OAAO,CAAC,OAAO,IAAC,MAAM,EAAE,KAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,GAAG,6BAE9C,EAClB,MAAC,OAAO,CAAC,OAAO,IAAC,SAAS,EAAC,MAAM,aAChC,KAAC,OAAO,CAAC,KAAK,KAAG,EACjB,KAAC,OAAO,CAAC,KAAK,wBAAsB,EACpC,KAAC,OAAO,CAAC,WAAW,6CAAiD,IACpD,KACT,CACV,CAAC;IACH,CAAC;CACD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Slider as BaseSlider, SliderRootProps } from '@base-ui/react/slider';
|
|
2
2
|
import { Ref } from 'react';
|
|
3
3
|
import { PaletteName } from '../../uno/index.js';
|
|
4
|
-
export declare const SliderRoot: <
|
|
4
|
+
export declare const SliderRoot: import("react").FunctionComponent<BaseSlider.Root.Props<number | readonly number[]> & {
|
|
5
5
|
ref?: Ref<HTMLDivElement>;
|
|
6
|
-
}
|
|
6
|
+
}>;
|
|
7
7
|
export declare const SliderControl: import("react").FunctionComponent<import("@base-ui/react/slider").SliderControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
8
|
export declare const SliderTrack: import("react").FunctionComponent<import("@base-ui/react/slider").SliderTrackProps & import("react").RefAttributes<HTMLElement>>;
|
|
9
9
|
export declare const SliderRange: import("react").FunctionComponent<import("@base-ui/react/slider").SliderIndicatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -23,9 +23,9 @@ export interface SliderProps extends SliderRootProps {
|
|
|
23
23
|
ref?: Ref<HTMLDivElement>;
|
|
24
24
|
}
|
|
25
25
|
export declare const Slider: (({ label, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
26
|
-
Root: <
|
|
26
|
+
Root: import("react").FunctionComponent<BaseSlider.Root.Props<number | readonly number[]> & {
|
|
27
27
|
ref?: Ref<HTMLDivElement>;
|
|
28
|
-
}
|
|
28
|
+
}>;
|
|
29
29
|
Base: ({ children, color, className, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
Control: import("react").FunctionComponent<import("@base-ui/react/slider").SliderControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
31
|
Track: import("react").FunctionComponent<import("@base-ui/react/slider").SliderTrackProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
import { Slider as BaseSlider } from '@base-ui/react/slider';
|
|
15
15
|
import clsx from 'clsx';
|
|
16
16
|
import { withClassName } from '../../hooks.js';
|
|
17
|
-
export const SliderRoot = BaseSlider.Root;
|
|
17
|
+
export const SliderRoot = withClassName(BaseSlider.Root, 'layer-components:w-full');
|
|
18
18
|
export const SliderControl = withClassName(BaseSlider.Control, 'layer-components:relative layer-components:flex layer-components:items-center layer-components:select-none layer-components:touch-none layer-components:w-full layer-components:h-30px layer-components:translate-z-0', 'layer-variants:[&[data-orientation=vertical]]:flex-col layer-variants:[&[data-orientation=vertical]]:h-full layer-variants:[&[data-orientation=vertical]]:w-30px');
|
|
19
19
|
export const SliderTrack = withClassName(BaseSlider.Track, 'layer-components:bg-transparent layer-components:relative layer-components:grow layer-components:rounded-lg layer-components:h-7px layer-components:ring-1 layer-components:ring-black layer-components:transition-colors layer-components:select-none', 'layer-variants:[&[data-orientation=vertical]]:w-7px layer-variants:[&[data-orientation=vertical]]:h-full layer-variants:[&[data-orientation=vertical]]:flex-1');
|
|
20
20
|
export const SliderRange = withClassName(BaseSlider.Indicator, 'layer-components:bg-main layer-components:rounded-lg layer-components:transition-colors', 'layer-variants:[&[data-orientation=vertical]]:bg-main');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/components/slider/Slider.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAmB,MAAM,uBAAuB,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../../src/components/slider/Slider.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAmB,MAAM,uBAAuB,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CACtC,UAAU,CAAC,IAAI,EACf,yBAAyB,CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CACzC,UAAU,CAAC,OAAO,EAClB,kGAAkG,EAClG,wEAAwE,CACxE,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CACvC,UAAU,CAAC,KAAK,EAChB,kHAAkH,EAClH,qEAAqE,CACrE,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CACvC,UAAU,CAAC,SAAS,EACpB,yDAAyD,EACzD,yDAAyD,CACzD,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CACvC,UAAU,CAAC,KAAK,EAChB,qKAAqK,EACrK,oCAAoC,EACpC,yFAAyF,EACzF,0GAA0G,EAC1G,uCAAuC,EACvC,wCAAwC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAKb,EAAE,EAAE;QALS,EAC1B,QAAQ,EACR,KAAK,EACL,SAAS,OAEI,EADV,KAAK,cAJkB,kCAK1B,CADQ;IAER,OAAO,CACN,KAAC,UAAU,oBACN,KAAK,IACT,SAAS,EAAE,IAAI,CAAC,KAAK,IAAI,WAAW,KAAK,EAAE,EAAE,SAAS,CAAC,YAEvD,KAAC,aAAa,cAAE,QAAQ,GAAiB,IAC7B,CACb,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACxB,KAAK,EACL,SAAS,GAIT,EAAE,EAAE,CAAC,CACL,KAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAE,SAAS,YACnC,MAAC,WAAW,eACX,KAAC,WAAW,KAAG,EACf,KAAC,WAAW,kBAAa,KAAK,GAAI,IACrB,GACE,CACjB,CAAC;AAQF,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAClC,SAAS,MAAM,CAAC,EAAgC;QAAhC,EAAE,KAAK,OAAyB,EAApB,KAAK,cAAjB,SAAmB,CAAF;IAChC,OAAO,CACN,KAAC,UAAU,oBAAK,KAAK,cACpB,KAAC,QAAQ,KAAG,IACA,CACb,CAAC;AACH,CAAC,EACD;IACC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,WAAW;IAClB,kCAAkC;IAClC,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,EAAE,EAAE,QAAQ;CACZ,CACD,CAAC"}
|
|
@@ -3,9 +3,9 @@ import { Slider } from './Slider.js';
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: (({ label, ...props }: import("./Slider.js").SliderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
6
|
-
Root: <
|
|
6
|
+
Root: import("react").FunctionComponent<import("@base-ui/react/slider").SliderRoot.Props<number | readonly number[]> & {
|
|
7
7
|
ref?: import("react").Ref<HTMLDivElement>;
|
|
8
|
-
}
|
|
8
|
+
}>;
|
|
9
9
|
Base: ({ children, color, className, ...props }: import("./Slider.js").SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
Control: import("react").FunctionComponent<import("@base-ui/react/slider").SliderControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
11
|
Track: import("react").FunctionComponent<import("@base-ui/react/slider").SliderTrackProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -20,7 +20,7 @@ export const TabsTrigger = withClassName(TabsPrimitive.Tab, 'layer-components:fl
|
|
|
20
20
|
export const TabsIndicator = withClassName(TabsPrimitive.Indicator, 'layer-components:absolute layer-components:block layer-components:[transition-property:transform,width,color] layer-components:duration-300 layer-components:ease-out layer-components:rounded-full layer-components:b-gray-dark layer-components:bg-main-light', 'layer-components:left-0 layer-components:top-1/2 layer-components:translate-x-[--active-tab-left] layer-components:-translate-y-1/2 layer-components:w-[--active-tab-width] layer-components:h-full layer-components:z-0', 'layer-components:b-1 layer-components:b-gray-dark');
|
|
21
21
|
export const TabsContent = withClassName(TabsPrimitive.Panel, 'layer-components:focus:outline-none layer-components:focus-visible:outline-none layer-components:focus-visible:ring-inset layer-components:focus-visible:ring-2 layer-components:focus-visible:ring-gray');
|
|
22
22
|
export const TabsList = (_a) => {
|
|
23
|
-
var { children, className, color = '
|
|
23
|
+
var { children, className, color = 'primary' } = _a, props = __rest(_a, ["children", "className", "color"]);
|
|
24
24
|
return (_jsxs(StyledTabsList, Object.assign({}, props, { className: clsx(`palette-${color}`, className), children: [children, _jsx(TabsIndicator, {})] })));
|
|
25
25
|
};
|
|
26
26
|
export const Tabs = Object.assign(TabsRoot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAEN,IAAI,IAA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AAG,aAAa,CACnC,aAAa,CAAC,IAAI,EAClB,6DAA6D,EAC7D,kEAAkE,EAClE,uCAAuC,EACvC,+FAA+F,CAC/F,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CACvC,aAAa,CAAC,GAAG,EACjB,6FAA6F,EAC7F,8DAA8D,EAC9D,8FAA8F,EAC9F,0DAA0D,EAC1D,wEAAwE,EACxE,4FAA4F,EAC5F,iGAAiG,EACjG,gCAAgC,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CACzC,aAAa,CAAC,SAAS,EACvB,4IAA4I,EAC5I,sHAAsH,EACtH,oCAAoC,CACpC,CAAC;AAIF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CACvC,aAAa,CAAC,KAAK,EACnB,gGAAgG,CAChG,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAOxB,EAAE,EAAE;QAPoB,EACxB,QAAQ,EACR,SAAS,EACT,KAAK,GAAG,SAAS,OAIjB,EAHG,KAAK,cAJgB,kCAKxB,CADQ;IAGH,OAAA,CACL,MAAC,cAAc,oBAAK,KAAK,IAAE,SAAS,EAAE,IAAI,CAAC,WAAW,KAAK,EAAE,EAAE,SAAS,CAAC,aACvE,QAAQ,EACT,KAAC,aAAa,KAAG,KACD,CACjB,CAAA;CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC3C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,SAAS,EAAE,aAAa;CACxB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Avatar } from './Avatar.js';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Avatar',
|
|
6
|
+
component: Avatar,
|
|
7
|
+
argTypes: {},
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: { expanded: true },
|
|
10
|
+
},
|
|
11
|
+
} satisfies Meta<typeof Avatar>;
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof Avatar>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
render(args) {
|
|
19
|
+
return <Avatar {...args} />;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithImage: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
imageSrc: 'https://i.pravatar.cc/300',
|
|
26
|
+
name: 'John Doe',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const WithName: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
name: 'Jane Smith',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const FailedImage: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
imageSrc: 'http://localhost:3333/nonexistent.jpg',
|
|
39
|
+
name: 'Fallback User',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -49,12 +49,14 @@ export function Avatar({
|
|
|
49
49
|
crossOrigin={crossOrigin}
|
|
50
50
|
/>
|
|
51
51
|
)}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
{!empty && (
|
|
53
|
+
<BaseAvatar.Fallback
|
|
54
|
+
className="text-size-[calc(0.5px*var(--avatar-size,24px))]"
|
|
55
|
+
style={{ '--avatar-size': size } as any}
|
|
56
|
+
>
|
|
57
|
+
{name?.charAt(0) || '?'}
|
|
58
|
+
</BaseAvatar.Fallback>
|
|
59
|
+
)}
|
|
58
60
|
{empty && <Icon name="profile" />}
|
|
59
61
|
</BaseAvatar.Root>
|
|
60
62
|
);
|
|
@@ -60,8 +60,15 @@ export const CollapsibleSimple = ({
|
|
|
60
60
|
</CollapsibleRoot>
|
|
61
61
|
);
|
|
62
62
|
|
|
63
|
+
export const CollapsibleIcon = withClassName(
|
|
64
|
+
'span',
|
|
65
|
+
'layer-components:transition-transform',
|
|
66
|
+
'layer-components:[[data-panel-open]_&]:rotate-180',
|
|
67
|
+
);
|
|
68
|
+
|
|
63
69
|
export const Collapsible = Object.assign(CollapsibleRoot, {
|
|
64
70
|
Content: CollapsibleContent,
|
|
65
71
|
Trigger: CollapsibleTrigger,
|
|
66
72
|
Simple: CollapsibleSimple,
|
|
73
|
+
Icon: CollapsibleIcon,
|
|
67
74
|
});
|
|
@@ -31,22 +31,3 @@ export const Default: Story = {
|
|
|
31
31
|
);
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
export const Anchored: Story = {
|
|
36
|
-
render(args) {
|
|
37
|
-
return (
|
|
38
|
-
<div className="layer-components:(relative h-[200px] flex items-center justify-center)">
|
|
39
|
-
<Popover open {...args}>
|
|
40
|
-
<Popover.Anchor>Anchor</Popover.Anchor>
|
|
41
|
-
<Popover.Content className="p-md">
|
|
42
|
-
<Popover.Arrow />
|
|
43
|
-
<Popover.Title>Hello</Popover.Title>
|
|
44
|
-
<Popover.Description>
|
|
45
|
-
This is a popover content anchored to the center of the container.
|
|
46
|
-
</Popover.Description>
|
|
47
|
-
</Popover.Content>
|
|
48
|
-
</Popover>
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
};
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
PopoverPopupProps,
|
|
3
3
|
PopoverPositionerProps,
|
|
4
4
|
Popover as PopoverPrimitive,
|
|
5
|
-
PopoverTriggerProps,
|
|
6
5
|
} from '@base-ui/react/popover';
|
|
7
6
|
|
|
8
7
|
import { MenuArrowProps } from '@base-ui/react/menu';
|
|
@@ -45,9 +44,6 @@ export const PopoverRoot = PopoverPrimitive.Root;
|
|
|
45
44
|
export const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
46
45
|
export const PopoverArrow = StyledArrow;
|
|
47
46
|
export const PopoverClose = StyledClose;
|
|
48
|
-
export const PopoverAnchor = (props: PopoverTriggerProps) => (
|
|
49
|
-
<PopoverTrigger {...props} disabled />
|
|
50
|
-
);
|
|
51
47
|
|
|
52
48
|
export const PopoverContent = function PopoverContent({
|
|
53
49
|
ref,
|
|
@@ -132,7 +128,6 @@ export const Popover = Object.assign(PopoverRoot, {
|
|
|
132
128
|
Arrow: PopoverArrow,
|
|
133
129
|
Close: PopoverClose,
|
|
134
130
|
Trigger: PopoverTrigger,
|
|
135
|
-
Anchor: PopoverAnchor,
|
|
136
131
|
Title: PopoverTitle,
|
|
137
132
|
Description: PopoverDescription,
|
|
138
133
|
createHandle: PopoverPrimitive.createHandle,
|
|
@@ -4,7 +4,10 @@ import { Ref } from 'react';
|
|
|
4
4
|
import { withClassName } from '../../hooks.js';
|
|
5
5
|
import { PaletteName } from '../../uno/index.js';
|
|
6
6
|
|
|
7
|
-
export const SliderRoot =
|
|
7
|
+
export const SliderRoot = withClassName(
|
|
8
|
+
BaseSlider.Root,
|
|
9
|
+
'layer-components:w-full',
|
|
10
|
+
);
|
|
8
11
|
|
|
9
12
|
export const SliderControl = withClassName(
|
|
10
13
|
BaseSlider.Control,
|