@particle-network/ui-react 0.1.4-beta.6 → 0.1.4-beta.8

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,7 +1,8 @@
1
1
  import type React from 'react';
2
2
  import { type CheckboxProps } from '@heroui/checkbox';
3
3
  type ExtendedCheckboxProps = Omit<CheckboxProps, 'color'> & {
4
- color?: 'primary' | 'success' | 'warning' | 'danger' | 'bullish' | 'bearish';
4
+ color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'bullish' | 'bearish';
5
+ labelPlacement?: 'left' | 'right';
5
6
  };
6
7
  declare const ExtendedCheckbox: React.ForwardRefExoticComponent<ExtendedCheckboxProps>;
7
8
  export default ExtendedCheckbox;
@@ -6,6 +6,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
6
6
  primary: {
7
7
  wrapper: 'after:bg-primary after:text-primary-foreground text-primary-foreground'
8
8
  },
9
+ secondary: {
10
+ wrapper: 'after:bg-tertiary after:text-tertiary-foreground text-tertiary-foreground'
11
+ },
9
12
  success: {
10
13
  wrapper: 'after:bg-success after:text-success-foreground text-success-foreground'
11
14
  },
@@ -25,9 +28,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
25
28
  size: {
26
29
  sm: {
27
30
  wrapper: [
28
- 'w-3.5 h-3.5 me-sm',
31
+ 'w-3.5 h-3.5 me-0',
29
32
  'rounded-[calc(theme(borderRadius.medium)*0.2)]',
30
- 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-foreground-300 before:border-1.5',
33
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-1.5',
31
34
  'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
32
35
  ],
33
36
  label: '!text-body3 font-medium',
@@ -35,9 +38,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
35
38
  },
36
39
  md: {
37
40
  wrapper: [
38
- 'w-4 h-4 me-2',
41
+ 'w-4 h-4 me-0',
39
42
  'rounded-[calc(theme(borderRadius.medium)*0.2)]',
40
- 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-foreground-300 before:border-2',
43
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.2)] before:border-secondary before:border-2',
41
44
  'after:rounded-[calc(theme(borderRadius.medium)*0.2)]'
42
45
  ],
43
46
  label: '!text-body2 font-medium',
@@ -45,9 +48,9 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
45
48
  },
46
49
  lg: {
47
50
  wrapper: [
48
- 'w-5 h-5 me-2',
51
+ 'w-[18px] h-[18px] me-0',
49
52
  'rounded-[calc(theme(borderRadius.medium)*0.3)]',
50
- 'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-foreground-300 before:border-2',
53
+ 'before:rounded-[calc(theme(borderRadius.medium)*0.3)] before:border-secondary before:border-2',
51
54
  'after:rounded-[calc(theme(borderRadius.medium)*0.3)]'
52
55
  ],
53
56
  label: '!text-body1 font-medium',
@@ -138,13 +141,22 @@ const ExtendedCheckbox = extendVariants(Checkbox, {
138
141
  icon: 'transition-opacity motion-reduce:transition-none',
139
142
  label: 'transition-colors-opacity before:transition-width motion-reduce:transition-none'
140
143
  }
144
+ },
145
+ labelPlacement: {
146
+ left: {
147
+ base: 'flex-row-reverse gap-2'
148
+ },
149
+ right: {
150
+ base: 'flex-row gap-2'
151
+ }
141
152
  }
142
153
  },
143
154
  defaultVariants: {
144
155
  color: 'primary',
145
156
  size: 'md',
146
157
  isDisabled: false,
147
- lineThrough: false
158
+ lineThrough: false,
159
+ labelPlacement: 'right'
148
160
  }
149
161
  });
150
162
  const checkbox_extend = ExtendedCheckbox;
@@ -3,7 +3,8 @@ import { type CheckboxGroupProps } from '@heroui/checkbox';
3
3
  import ExtendedCheckbox from './checkbox.extend';
4
4
  export type UXCheckboxProps = React.ComponentPropsWithRef<typeof ExtendedCheckbox>;
5
5
  declare const UXCheckbox: React.ForwardRefExoticComponent<Omit<Omit<import("@heroui/checkbox").CheckboxProps, "color"> & {
6
- color?: "primary" | "success" | "warning" | "danger" | "bullish" | "bearish";
6
+ color?: "primary" | "secondary" | "success" | "warning" | "danger" | "bullish" | "bearish";
7
+ labelPlacement?: "left" | "right";
7
8
  }, "ref"> & React.RefAttributes<HTMLInputElement>>;
8
9
  export default UXCheckbox;
9
10
  export declare const UXCheckboxGroup: import("@heroui/system-rsc").InternalForwardRefRenderFunction<"div", CheckboxGroupProps, never>;
@@ -3,13 +3,25 @@ import "react";
3
3
  import { DateRangePicker } from "@heroui/date-picker";
4
4
  import { CalendarIcon } from "../../icons/index.js";
5
5
  import { calendarClassNames } from "../UXCalendar/index.js";
6
+ const classes = {
7
+ inputWrapper: 'bg-background-200 h-[30px] min-h-[30px] rounded-small',
8
+ focus: 'focus:bg-primary/30 focus:shadow-none focus:outline-none'
9
+ };
6
10
  const UXDateRangePicker = ({ classNames, ...props })=>/*#__PURE__*/ jsx(DateRangePicker, {
7
11
  classNames: {
8
- inputWrapper: 'bg-background-200 h-[30px] min-h-[30px] rounded-small',
9
- input: 'gap-px',
10
- segment: 'text-foreground text-xs font-medium',
12
+ inputWrapper: classes.inputWrapper,
13
+ input: [
14
+ 'gap-px',
15
+ classes.focus
16
+ ],
17
+ segment: [
18
+ 'text-foreground text-xs font-medium',
19
+ classes.focus
20
+ ],
11
21
  separator: 'text-foreground-100',
12
22
  timeInputWrapper: 'bg-content1',
23
+ timeInput: classes.focus,
24
+ selectorButton: 'w-6 h-6 min-w-6 rounded-sm',
13
25
  ...classNames
14
26
  },
15
27
  calendarProps: {
@@ -21,8 +33,17 @@ const UXDateRangePicker = ({ classNames, ...props })=>/*#__PURE__*/ jsx(DateRang
21
33
  content: 'bg-content1 text-foreground-300 shadow-box'
22
34
  }
23
35
  },
36
+ timeInputProps: {
37
+ classNames: {
38
+ base: [
39
+ '[&>[data-slot="input-wrapper"]]:h-[30px] [&>[data-slot="input-wrapper"]]:min-h-[30px] [&>[data-slot="input-wrapper"]]:rounded-small [&>[data-slot="input-wrapper"]]:bg-background-200',
40
+ '[&_[data-slot=segment]:focus]:bg-primary/30 [&_[data-slot=segment]:focus]:shadow-none [&_[data-slot=segment]:focus]:outline-none'
41
+ ]
42
+ }
43
+ },
24
44
  selectorIcon: /*#__PURE__*/ jsx(CalendarIcon, {
25
- size: 18
45
+ size: 18,
46
+ color: "tertiary"
26
47
  }),
27
48
  granularity: "second",
28
49
  visibleMonths: 2,
@@ -4,25 +4,25 @@ const tabsClasses = {
4
4
  variant: {
5
5
  solid: {
6
6
  tabList: 'gap-0 bg-background-400',
7
- tab: 'py-0',
7
+ tab: 'py-0 !outline-none',
8
8
  cursor: 'shadow-none inset-0',
9
9
  tabContent: 'text-foreground-300 font-medium'
10
10
  },
11
11
  switch: {
12
12
  tabList: 'p-0 gap-0 bg-background-200',
13
- tab: 'py-0',
13
+ tab: 'py-0 !outline-none',
14
14
  cursor: 'shadow-none inset-0',
15
15
  tabContent: 'text-foreground-300 font-medium'
16
16
  },
17
17
  light: {
18
18
  tabList: 'p-0 gap-md rounded-none bg-transparent dark:bg-transparent',
19
- tab: 'py-0 h-full',
19
+ tab: 'py-0 h-full !outline-none',
20
20
  cursor: 'shadow-none',
21
21
  tabContent: 'text-foreground-300 font-medium'
22
22
  },
23
23
  text: {
24
24
  tabList: 'p-0 rounded-none bg-transparent dark:bg-transparent',
25
- tab: 'font-medium p-0 h-fit rounded-none',
25
+ tab: 'font-medium p-0 h-fit rounded-none !outline-none',
26
26
  tabContent: 'text-foreground-300 font-medium',
27
27
  cursor: 'hidden'
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.1.4-beta.6",
3
+ "version": "0.1.4-beta.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -39,8 +39,8 @@
39
39
  "@types/react": "^19.1.10",
40
40
  "react": "^19.1.0",
41
41
  "typescript": "^5.8.3",
42
- "@particle-network/eslint-config": "0.3.0",
43
- "@particle-network/lintstaged-config": "0.1.0"
42
+ "@particle-network/lintstaged-config": "0.1.0",
43
+ "@particle-network/eslint-config": "0.3.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.9.0",
@@ -124,6 +124,9 @@ module.exports = {
124
124
  content1: {
125
125
  DEFAULT: '#FFFFFF',
126
126
  },
127
+ overlay: {
128
+ DEFAULT: '#FFFFFF',
129
+ },
127
130
  background: {
128
131
  200: '#E8E8ED',
129
132
  300: '#F0F0F2',
@@ -149,7 +152,11 @@ module.exports = {
149
152
  foreground: '#FFFFFF',
150
153
  },
151
154
  secondary: {
152
- DEFAULT: '#E8E8EB',
155
+ DEFAULT: '#767A80',
156
+ foreground: '#FFFFFF',
157
+ },
158
+ tertiary: {
159
+ DEFAULT: '#C0C0C9',
153
160
  foreground: '#000000',
154
161
  },
155
162
  success: {
@@ -175,6 +182,9 @@ module.exports = {
175
182
  content1: {
176
183
  DEFAULT: '#17171C',
177
184
  },
185
+ overlay: {
186
+ DEFAULT: '#17171C',
187
+ },
178
188
  background: {
179
189
  200: '#1F1F23',
180
190
  300: '#17171C',
@@ -200,7 +210,11 @@ module.exports = {
200
210
  foreground: '#FFFFFF',
201
211
  },
202
212
  secondary: {
203
- DEFAULT: '#1F1F23',
213
+ DEFAULT: '#A1A1AA',
214
+ foreground: '#FFFFFF',
215
+ },
216
+ tertiary: {
217
+ DEFAULT: '#4E4E56',
204
218
  foreground: '#FFFFFF',
205
219
  },
206
220
  success: {