@mbao01/common 0.2.4 → 0.2.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.
@@ -1,5 +1,5 @@
1
1
  export declare const getAvatarClasses: (props?: ({
2
- size?: 16 | 4 | 8 | 12 | 24 | 32 | 48 | 64 | null | undefined;
2
+ size?: 4 | 8 | 12 | 16 | 24 | 32 | 48 | 64 | null | undefined;
3
3
  status?: "online" | "offline" | null | undefined;
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
5
  export declare const getAvatarImageClasses: (props?: ({
@@ -8,7 +8,7 @@ export declare const getAvatarImageClasses: (props?: ({
8
8
  ring?: boolean | null | undefined;
9
9
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
10
  export declare const getAvatarFallbackClasses: (props?: ({
11
- size?: 16 | 4 | 8 | 12 | 24 | 32 | 48 | 64 | null | undefined;
11
+ size?: 4 | 8 | 12 | 16 | 24 | 32 | 48 | 64 | null | undefined;
12
12
  variant?: "accent" | "default" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "ghost" | null | undefined;
13
13
  shape?: "circle" | "round" | "hexagon" | "triangle" | "television" | null | undefined;
14
14
  ring?: boolean | null | undefined;
@@ -8,6 +8,7 @@ declare const Select: {
8
8
  variant?: "accent" | "default" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | "ghost" | undefined;
9
9
  size?: "xs" | "sm" | "md" | "lg" | undefined;
10
10
  outline?: boolean | undefined;
11
+ wide?: boolean | undefined;
11
12
  } & {
12
13
  label?: React.ReactNode;
13
14
  labelPosition?: "start" | "end" | "floating";
@@ -20,6 +21,7 @@ declare const Select: {
20
21
  variant?: "accent" | "default" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | "ghost" | undefined;
21
22
  size?: "xs" | "sm" | "md" | "lg" | undefined;
22
23
  outline?: boolean | undefined;
24
+ wide?: boolean | undefined;
23
25
  } & React.RefAttributes<HTMLDivElement>>;
24
26
  Icon: React.ForwardRefExoticComponent<SelectPrimitive.SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
25
27
  ItemText: React.ForwardRefExoticComponent<SelectPrimitive.SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1,5 +1,6 @@
1
1
  export declare const getSelectTriggerClasses: (props?: ({
2
2
  variant?: "accent" | "default" | "error" | "info" | "primary" | "secondary" | "success" | "warning" | "ghost" | null | undefined;
3
+ wide?: boolean | null | undefined;
3
4
  outline?: boolean | null | undefined;
4
5
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
5
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -3,21 +3,21 @@ import * as ResizablePrimitive from "react-resizable-panels";
3
3
  declare const Resizable: {
4
4
  ({ className, ...props }: ResizableProps): import("react/jsx-runtime").JSX.Element;
5
5
  Panel: import('react').ForwardRefExoticComponent<Omit<import('react').HTMLAttributes<HTMLElement | HTMLAnchorElement | HTMLSpanElement | HTMLButtonElement | HTMLUListElement | HTMLLIElement | HTMLOListElement | HTMLObjectElement | HTMLLinkElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLMapElement | HTMLDialogElement | HTMLFormElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLBaseElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDivElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
6
- className?: string | undefined;
6
+ className?: string;
7
7
  collapsedSize?: number | undefined;
8
8
  collapsible?: boolean | undefined;
9
9
  defaultSize?: number | undefined;
10
- id?: string | undefined;
10
+ id?: string;
11
11
  maxSize?: number | undefined;
12
12
  minSize?: number | undefined;
13
- onCollapse?: ResizablePrimitive.PanelOnCollapse | undefined;
14
- onExpand?: ResizablePrimitive.PanelOnExpand | undefined;
15
- onResize?: ResizablePrimitive.PanelOnResize | undefined;
16
- order?: number | undefined;
17
- style?: object | undefined;
13
+ onCollapse?: ResizablePrimitive.PanelOnCollapse;
14
+ onExpand?: ResizablePrimitive.PanelOnExpand;
15
+ onResize?: ResizablePrimitive.PanelOnResize;
16
+ order?: number;
17
+ style?: object;
18
18
  tagName?: keyof HTMLElementTagNameMap | undefined;
19
19
  } & {
20
- children?: import('react').ReactNode;
20
+ children?: import('react').ReactNode | undefined;
21
21
  } & import('react').RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
22
22
  Handle: ({ withHandle, bordered, className, ...props }: ResizableHandleProps) => import("react/jsx-runtime").JSX.Element;
23
23
  };
@@ -1,6 +1,6 @@
1
1
  export declare const getSkeletonClasses: (props?: ({
2
2
  variant?: "pulse" | null | undefined;
3
- width?: 16 | 4 | 8 | 2 | 12 | 24 | 32 | 48 | 64 | "full" | null | undefined;
4
- height?: 16 | 4 | 8 | 2 | 12 | 24 | 32 | 48 | 64 | "full" | null | undefined;
3
+ width?: 4 | 8 | 2 | 12 | 16 | 24 | 32 | 48 | 64 | "full" | null | undefined;
4
+ height?: 4 | 8 | 2 | 12 | 16 | 24 | 32 | 48 | 64 | "full" | null | undefined;
5
5
  round?: boolean | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mbao01/common",
3
3
  "private": false,
4
- "version": "0.2.4",
4
+ "version": "0.2.9",
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
7
7
  "license": "MIT",
@@ -69,29 +69,29 @@
69
69
  "@dnd-kit/modifiers": "^9.0.0",
70
70
  "@dnd-kit/sortable": "^10.0.0",
71
71
  "@dnd-kit/utilities": "^3.2.2",
72
- "@radix-ui/react-accordion": "^1.2.3",
73
- "@radix-ui/react-alert-dialog": "^1.1.6",
74
- "@radix-ui/react-avatar": "^1.1.3",
75
- "@radix-ui/react-checkbox": "^1.1.4",
76
- "@radix-ui/react-collapsible": "^1.1.3",
77
- "@radix-ui/react-context-menu": "^2.2.6",
78
- "@radix-ui/react-dialog": "^1.1.6",
79
- "@radix-ui/react-dropdown-menu": "^2.1.6",
80
- "@radix-ui/react-hover-card": "^1.1.6",
81
- "@radix-ui/react-label": "^2.1.2",
82
- "@radix-ui/react-menubar": "^1.1.6",
83
- "@radix-ui/react-navigation-menu": "^1.2.5",
84
- "@radix-ui/react-popover": "^1.1.6",
85
- "@radix-ui/react-progress": "^1.1.2",
86
- "@radix-ui/react-scroll-area": "^1.2.3",
87
- "@radix-ui/react-select": "^2.1.6",
88
- "@radix-ui/react-separator": "^1.1.2",
89
- "@radix-ui/react-slider": "^1.2.3",
90
- "@radix-ui/react-slot": "^1.1.2",
91
- "@radix-ui/react-tabs": "^1.1.3",
92
- "@radix-ui/react-toggle": "^1.1.2",
93
- "@radix-ui/react-toggle-group": "^1.1.2",
94
- "@radix-ui/react-tooltip": "^1.1.8",
72
+ "@radix-ui/react-accordion": "^1.2.8",
73
+ "@radix-ui/react-alert-dialog": "^1.1.11",
74
+ "@radix-ui/react-avatar": "^1.1.7",
75
+ "@radix-ui/react-checkbox": "^1.2.3",
76
+ "@radix-ui/react-collapsible": "^1.1.8",
77
+ "@radix-ui/react-context-menu": "^2.2.12",
78
+ "@radix-ui/react-dialog": "^1.1.11",
79
+ "@radix-ui/react-dropdown-menu": "^2.1.12",
80
+ "@radix-ui/react-hover-card": "^1.1.11",
81
+ "@radix-ui/react-label": "^2.1.4",
82
+ "@radix-ui/react-menubar": "^1.1.12",
83
+ "@radix-ui/react-navigation-menu": "^1.2.10",
84
+ "@radix-ui/react-popover": "^1.1.11",
85
+ "@radix-ui/react-progress": "^1.1.4",
86
+ "@radix-ui/react-scroll-area": "^1.2.6",
87
+ "@radix-ui/react-select": "^2.2.2",
88
+ "@radix-ui/react-separator": "^1.1.4",
89
+ "@radix-ui/react-slider": "^1.3.2",
90
+ "@radix-ui/react-slot": "^1.2.0",
91
+ "@radix-ui/react-tabs": "^1.1.9",
92
+ "@radix-ui/react-toggle": "^1.1.6",
93
+ "@radix-ui/react-toggle-group": "^1.1.7",
94
+ "@radix-ui/react-tooltip": "^1.2.4",
95
95
  "@tailwindcss/typography": "^0.5.16",
96
96
  "chrono-node": "^2.8.0",
97
97
  "class-variance-authority": "^0.7.1",
@@ -99,12 +99,12 @@
99
99
  "cmdk": "^1.1.1",
100
100
  "date-fns": "^4.1.0",
101
101
  "embla-carousel-react": "^8.6.0",
102
- "lucide-react": "^0.487.0",
103
- "react-day-picker": "^9.6.5",
102
+ "lucide-react": "^0.507.0",
103
+ "react-day-picker": "^9.6.7",
104
104
  "react-dropzone": "^14.3.8",
105
105
  "react-international-phone": "^4.5.0",
106
106
  "react-otp-input": "^3.1.1",
107
- "react-resizable-panels": "^2.1.7",
107
+ "react-resizable-panels": "^3.0.0",
108
108
  "sonner": "^2.0.3",
109
109
  "tailwind-merge": "^3.2.0",
110
110
  "timescape": "^0.7.1",
@@ -112,7 +112,7 @@
112
112
  "vaul": "^1.1.2"
113
113
  },
114
114
  "devDependencies": {
115
- "@eslint/js": "^9.24.0",
115
+ "@eslint/js": "^9.26.0",
116
116
  "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
117
117
  "@storybook/addon-a11y": "^8.6.12",
118
118
  "@storybook/addon-coverage": "^1.0.5",
@@ -128,44 +128,44 @@
128
128
  "@storybook/react-vite": "^8.6.12",
129
129
  "@storybook/test": "^8.6.12",
130
130
  "@storybook/test-runner": "^0.22.0",
131
- "@tailwindcss/postcss": "^4.1.3",
132
- "@tailwindcss/vite": "^4.1.3",
131
+ "@tailwindcss/postcss": "^4.1.5",
132
+ "@tailwindcss/vite": "^4.1.5",
133
133
  "@testing-library/jest-dom": "^6.6.3",
134
134
  "@testing-library/react": "^16.3.0",
135
135
  "@testing-library/user-event": "^14.6.1",
136
136
  "@types/jest-image-snapshot": "^6.4.0",
137
- "@types/node": "^22.14.0",
138
- "@types/react": "^19.1.0",
139
- "@types/react-dom": "^19.1.1",
140
- "@typescript-eslint/eslint-plugin": "^8.29.1",
141
- "@typescript-eslint/parser": "^8.29.1",
142
- "@vitejs/plugin-react": "^4.3.4",
143
- "@vitest/coverage-v8": "^3.1.1",
144
- "@vitest/ui": "^3.1.1",
137
+ "@types/node": "^22.15.3",
138
+ "@types/react": "^19.1.2",
139
+ "@types/react-dom": "^19.1.3",
140
+ "@typescript-eslint/eslint-plugin": "^8.31.1",
141
+ "@typescript-eslint/parser": "^8.31.1",
142
+ "@vitejs/plugin-react": "^4.4.1",
143
+ "@vitest/coverage-v8": "^3.1.2",
144
+ "@vitest/ui": "^3.1.2",
145
145
  "axe-playwright": "^2.1.0",
146
- "daisyui": "^5.0.16",
147
- "eslint": "^9.24.0",
146
+ "daisyui": "^5.0.35",
147
+ "eslint": "^9.26.0",
148
148
  "eslint-plugin-react": "^7.37.5",
149
149
  "eslint-plugin-react-hooks": "^5.2.0",
150
- "eslint-plugin-react-refresh": "^0.4.19",
150
+ "eslint-plugin-react-refresh": "^0.4.20",
151
151
  "eslint-plugin-storybook": "^0.12.0",
152
152
  "globals": "^16.0.0",
153
153
  "jest-image-snapshot": "^6.4.0",
154
- "jsdom": "^26.0.0",
154
+ "jsdom": "^26.1.0",
155
155
  "path": "^0.12.7",
156
156
  "postcss": "^8.5.3",
157
157
  "prettier": "^3.5.3",
158
158
  "react": "^19.1.0",
159
159
  "react-dom": "^19.1.0",
160
- "react-router-dom": "^7.5.0",
161
- "recharts": "^2.15.2",
160
+ "react-router-dom": "^7.5.3",
161
+ "recharts": "^2.15.3",
162
162
  "storybook": "^8.6.12",
163
- "tailwindcss": "^4.1.3",
163
+ "tailwindcss": "^4.1.5",
164
164
  "typescript": "^5.8.3",
165
- "typescript-eslint": "^8.29.1",
166
- "vite": "^6.2.5",
165
+ "typescript-eslint": "^8.31.1",
166
+ "vite": "^6.3.4",
167
167
  "vite-plugin-dts": "^4.5.3",
168
- "vitest": "^3.1.1"
168
+ "vitest": "^3.1.2"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "daisyui": "5",
@@ -174,5 +174,5 @@
174
174
  "recharts": "2",
175
175
  "typescript": "5"
176
176
  },
177
- "gitHead": "4e8242f09ad1b2aef4f84ee05573df8b875ab015"
177
+ "gitHead": "2e6a180358821c33bef679ccd0cbe360f5372cf4"
178
178
  }
@@ -45,7 +45,18 @@ const SelectTrigger = React.forwardRef<
45
45
  SelectTriggerProps
46
46
  >(
47
47
  (
48
- { id, label, labelPosition = "start", className, children, size, variant, outline, ...props },
48
+ {
49
+ id,
50
+ label,
51
+ labelPosition = "start",
52
+ className,
53
+ children,
54
+ size,
55
+ wide,
56
+ variant,
57
+ outline,
58
+ ...props
59
+ },
49
60
  ref
50
61
  ) => {
51
62
  if (label) {
@@ -56,7 +67,7 @@ const SelectTrigger = React.forwardRef<
56
67
  <SelectPrimitive.Trigger
57
68
  id={id}
58
69
  ref={ref}
59
- className={cn(getSelectTriggerClasses({ size, variant, outline }), className)}
70
+ className={cn(getSelectTriggerClasses({ size, wide, variant, outline }), className)}
60
71
  {...props}
61
72
  >
62
73
  {children}
@@ -68,7 +79,7 @@ const SelectTrigger = React.forwardRef<
68
79
  return (
69
80
  <label
70
81
  htmlFor={id}
71
- className={cn(getSelectTriggerClasses({ size, variant, outline }), className)}
82
+ className={cn(getSelectTriggerClasses({ size, wide, variant, outline }), className)}
72
83
  >
73
84
  {labelPosition === "start" && <LabelForSelect>{label}</LabelForSelect>}
74
85
  <SelectPrimitive.Trigger id={id} ref={ref} {...props}>
@@ -83,7 +94,7 @@ const SelectTrigger = React.forwardRef<
83
94
  <SelectPrimitive.Trigger
84
95
  id={id}
85
96
  ref={ref}
86
- className={cn(getSelectTriggerClasses({ size, variant, outline }), className)}
97
+ className={cn(getSelectTriggerClasses({ size, wide, variant, outline }), className)}
87
98
  {...props}
88
99
  >
89
100
  {children}
@@ -16,6 +16,9 @@ export const getSelectTriggerClasses = cva(
16
16
  error: "select-error",
17
17
  ghost: "select-ghost bg-transparent",
18
18
  },
19
+ wide: {
20
+ true: "w-full",
21
+ },
19
22
  outline: {
20
23
  true: "border border-input",
21
24
  },