@bubo-squared/ui-framework 0.1.95 → 0.1.96
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 +47 -47
- package/dist/index.cjs +108 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +108 -49
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/style.d.ts +2 -2
package/README.md
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
## @bubo-squared/ui-framework
|
|
2
|
-
|
|
3
|
-
Styled React UI components used across Bubo Squared frontend applications.
|
|
4
|
-
|
|
5
|
-
This library is loosely based on shadcn/ui patterns and uses Radix UI primitives for several interactive components.
|
|
6
|
-
|
|
7
|
-
### Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @bubo-squared/ui-framework @bubo-squared/icons
|
|
11
|
-
# or
|
|
12
|
-
pnpm add @bubo-squared/ui-framework @bubo-squared/icons
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Peer dependencies
|
|
16
|
-
|
|
17
|
-
- React 18 or 19
|
|
18
|
-
- React DOM 18 or 19
|
|
19
|
-
|
|
20
|
-
Make sure these are installed in your app:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install react react-dom
|
|
24
|
-
# or
|
|
25
|
-
pnpm add react react-dom
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Basic usage
|
|
29
|
-
|
|
30
|
-
```tsx
|
|
31
|
-
import { Button } from '@bubo-squared/ui-framework'
|
|
32
|
-
|
|
33
|
-
export function Example() {
|
|
34
|
-
return <Button variant="primary">Click me</Button>
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
The design system exposes multiple components (buttons, inputs, navigation, feedback, etc.) with a consistent API and styling suitable for Bubo Squared products.
|
|
39
|
-
|
|
40
|
-
### Styling
|
|
41
|
-
|
|
42
|
-
Components are built to work well with modern Tailwind-based setups and utility-first styling. You can extend or override styles via `className` props and your existing design tokens.
|
|
43
|
-
|
|
44
|
-
### License
|
|
45
|
-
|
|
46
|
-
This package is intended for use within Bubo Squared projects and related applications.
|
|
47
|
-
|
|
1
|
+
## @bubo-squared/ui-framework
|
|
2
|
+
|
|
3
|
+
Styled React UI components used across Bubo Squared frontend applications.
|
|
4
|
+
|
|
5
|
+
This library is loosely based on shadcn/ui patterns and uses Radix UI primitives for several interactive components.
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @bubo-squared/ui-framework @bubo-squared/icons
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @bubo-squared/ui-framework @bubo-squared/icons
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Peer dependencies
|
|
16
|
+
|
|
17
|
+
- React 18 or 19
|
|
18
|
+
- React DOM 18 or 19
|
|
19
|
+
|
|
20
|
+
Make sure these are installed in your app:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install react react-dom
|
|
24
|
+
# or
|
|
25
|
+
pnpm add react react-dom
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Basic usage
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { Button } from '@bubo-squared/ui-framework'
|
|
32
|
+
|
|
33
|
+
export function Example() {
|
|
34
|
+
return <Button variant="primary">Click me</Button>
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The design system exposes multiple components (buttons, inputs, navigation, feedback, etc.) with a consistent API and styling suitable for Bubo Squared products.
|
|
39
|
+
|
|
40
|
+
### Styling
|
|
41
|
+
|
|
42
|
+
Components are built to work well with modern Tailwind-based setups and utility-first styling. You can extend or override styles via `className` props and your existing design tokens.
|
|
43
|
+
|
|
44
|
+
### License
|
|
45
|
+
|
|
46
|
+
This package is intended for use within Bubo Squared projects and related applications.
|
|
47
|
+
|
package/dist/index.cjs
CHANGED
|
@@ -723,7 +723,6 @@ BadgeStatus.displayName = "BadgeStatus";
|
|
|
723
723
|
var React11 = require("react");
|
|
724
724
|
var import_icons2 = require("@bubo-squared/icons");
|
|
725
725
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
726
|
-
var lineClassBase = "flex-1 bg-(--border-secondary) h-px";
|
|
727
726
|
var gapBySize = {
|
|
728
727
|
sm: "gap-2",
|
|
729
728
|
md: "gap-3",
|
|
@@ -739,50 +738,74 @@ var textClassBySize = {
|
|
|
739
738
|
var Divider = (props) => {
|
|
740
739
|
const resolvedType = props.type ?? "default";
|
|
741
740
|
const resolvedSize = props.size ?? "sm";
|
|
741
|
+
const resolvedOrientation = props.orientation ?? "horizontal";
|
|
742
|
+
const ariaOrientation = resolvedOrientation === "vertical" ? "vertical" : "horizontal";
|
|
742
743
|
const showCenter = resolvedType !== "default";
|
|
743
|
-
const lineClass =
|
|
744
|
+
const lineClass = resolvedOrientation === "vertical" ? "flex-1 bg-(--border-secondary) w-px" : "flex-1 bg-(--border-secondary) h-px";
|
|
744
745
|
const wrapperClass = cn(
|
|
745
|
-
"flex
|
|
746
|
+
"flex items-center",
|
|
747
|
+
resolvedOrientation === "vertical" ? "h-full flex-col" : "w-full",
|
|
746
748
|
showCenter ? gapBySize[resolvedSize] : "gap-0",
|
|
747
749
|
props.className
|
|
748
750
|
);
|
|
749
751
|
if (props.type === void 0 || props.type === "default") {
|
|
750
752
|
const {
|
|
751
753
|
type: _type,
|
|
754
|
+
orientation: _orientation,
|
|
752
755
|
size: _size,
|
|
753
756
|
label: _label,
|
|
754
757
|
className: _className,
|
|
755
758
|
...divProps
|
|
756
759
|
} = props;
|
|
757
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
761
|
+
"div",
|
|
762
|
+
{
|
|
763
|
+
className: wrapperClass,
|
|
764
|
+
role: "separator",
|
|
765
|
+
"aria-orientation": ariaOrientation,
|
|
766
|
+
...divProps,
|
|
767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
|
|
768
|
+
}
|
|
769
|
+
);
|
|
758
770
|
}
|
|
759
771
|
if (props.type === "text") {
|
|
760
772
|
const {
|
|
761
773
|
type: _type,
|
|
774
|
+
orientation: _orientation,
|
|
762
775
|
size: _size,
|
|
763
776
|
label,
|
|
764
777
|
className: _className,
|
|
765
778
|
...divProps
|
|
766
779
|
} = props;
|
|
767
780
|
const textLabel = label ? label : "OR";
|
|
768
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
782
|
+
"div",
|
|
783
|
+
{
|
|
784
|
+
className: wrapperClass,
|
|
785
|
+
role: "separator",
|
|
786
|
+
"aria-orientation": ariaOrientation,
|
|
787
|
+
...divProps,
|
|
788
|
+
children: [
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
791
|
+
"span",
|
|
792
|
+
{
|
|
793
|
+
className: cn(
|
|
794
|
+
textClassBySize[resolvedSize],
|
|
795
|
+
"text-(--color-secondary)"
|
|
796
|
+
),
|
|
797
|
+
children: textLabel
|
|
798
|
+
}
|
|
776
799
|
),
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
] });
|
|
800
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
|
|
801
|
+
]
|
|
802
|
+
}
|
|
803
|
+
);
|
|
782
804
|
}
|
|
783
805
|
if (props.type === "iconButton") {
|
|
784
806
|
const {
|
|
785
807
|
type: _type,
|
|
808
|
+
orientation: _orientation,
|
|
786
809
|
size: _size,
|
|
787
810
|
icon,
|
|
788
811
|
iconButtonVariant,
|
|
@@ -791,38 +814,65 @@ var Divider = (props) => {
|
|
|
791
814
|
className: _className,
|
|
792
815
|
...divProps
|
|
793
816
|
} = props;
|
|
794
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
818
|
+
"div",
|
|
819
|
+
{
|
|
820
|
+
className: wrapperClass,
|
|
821
|
+
role: "separator",
|
|
822
|
+
"aria-orientation": ariaOrientation,
|
|
823
|
+
...divProps,
|
|
824
|
+
children: [
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
827
|
+
IconButton,
|
|
828
|
+
{
|
|
829
|
+
variant: iconButtonVariant ?? "secondary",
|
|
830
|
+
size: resolvedSize,
|
|
831
|
+
"aria-label": ariaLabel ?? "More options",
|
|
832
|
+
icon: icon ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons2.TargetIcon, {}),
|
|
833
|
+
onClick: onIconClick
|
|
834
|
+
}
|
|
835
|
+
),
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
|
|
837
|
+
]
|
|
838
|
+
}
|
|
839
|
+
);
|
|
808
840
|
}
|
|
809
841
|
if (props.type === "iconButtonGroup") {
|
|
810
842
|
const {
|
|
811
843
|
type: _type,
|
|
844
|
+
orientation: _orientation,
|
|
812
845
|
size: _size,
|
|
813
846
|
iconGroupItems,
|
|
814
847
|
className: _className,
|
|
815
848
|
...divProps
|
|
816
849
|
} = props;
|
|
817
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
851
|
+
"div",
|
|
852
|
+
{
|
|
853
|
+
className: wrapperClass,
|
|
854
|
+
role: "separator",
|
|
855
|
+
"aria-orientation": ariaOrientation,
|
|
856
|
+
...divProps,
|
|
857
|
+
children: [
|
|
858
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
|
|
859
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
860
|
+
IconButtonGroup,
|
|
861
|
+
{
|
|
862
|
+
className: resolvedOrientation === "vertical" ? "flex-col" : "flex-row",
|
|
863
|
+
items: iconGroupItems,
|
|
864
|
+
size: resolvedSize
|
|
865
|
+
}
|
|
866
|
+
),
|
|
867
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
|
|
868
|
+
]
|
|
869
|
+
}
|
|
870
|
+
);
|
|
822
871
|
}
|
|
823
872
|
if (props.type === "button") {
|
|
824
873
|
const {
|
|
825
874
|
type: _type,
|
|
875
|
+
orientation: _orientation,
|
|
826
876
|
size: _size,
|
|
827
877
|
buttonLabel,
|
|
828
878
|
onButtonClick,
|
|
@@ -830,19 +880,28 @@ var Divider = (props) => {
|
|
|
830
880
|
className: _className,
|
|
831
881
|
...divProps
|
|
832
882
|
} = props;
|
|
833
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
884
|
+
"div",
|
|
885
|
+
{
|
|
886
|
+
className: wrapperClass,
|
|
887
|
+
role: "separator",
|
|
888
|
+
"aria-orientation": ariaOrientation,
|
|
889
|
+
...divProps,
|
|
890
|
+
children: [
|
|
891
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
|
|
892
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
893
|
+
Button,
|
|
894
|
+
{
|
|
895
|
+
variant: buttonVariant ?? "secondary",
|
|
896
|
+
size: resolvedSize,
|
|
897
|
+
onClick: onButtonClick,
|
|
898
|
+
children: buttonLabel
|
|
899
|
+
}
|
|
900
|
+
),
|
|
901
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
|
|
902
|
+
]
|
|
903
|
+
}
|
|
904
|
+
);
|
|
846
905
|
}
|
|
847
906
|
return null;
|
|
848
907
|
};
|