@particle-network/ui-react 0.1.4-beta.9 → 0.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.
@@ -378,7 +378,13 @@ const button_theme_button = tv({
378
378
  isSelected: true,
379
379
  color: 'default',
380
380
  variant: 'solid',
381
- class: 'bg-foreground-100'
381
+ class: 'bg-tertiary'
382
+ },
383
+ {
384
+ isSelected: true,
385
+ color: 'secondary',
386
+ variant: 'solid',
387
+ class: 'bg-tertiary text-foreground'
382
388
  },
383
389
  {
384
390
  isSelected: true,
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type DatePickerProps } from '@heroui/date-picker';
3
+ export type UXDatePickerProps = DatePickerProps;
4
+ export declare const UXDatePicker: React.FC<UXDatePickerProps>;
@@ -0,0 +1,52 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { DatePicker } from "@heroui/date-picker";
4
+ import { CalendarIcon } from "../../icons/index.js";
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
+ };
10
+ const UXDatePicker = ({ classNames, ...props })=>/*#__PURE__*/ jsx(DatePicker, {
11
+ classNames: {
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
+ ],
21
+ timeInput: classes.focus,
22
+ selectorButton: 'w-6 h-6 min-w-6 rounded-sm -mx-1',
23
+ selectorIcon: 'text-secondary',
24
+ ...classNames
25
+ },
26
+ calendarProps: {
27
+ classNames: calendarClassNames
28
+ },
29
+ popoverProps: {
30
+ classNames: {
31
+ base: 'before:bg-content1 before:shadow-box',
32
+ content: 'bg-content1 text-foreground-300 shadow-box'
33
+ }
34
+ },
35
+ timeInputProps: {
36
+ classNames: {
37
+ base: [
38
+ '[&>[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',
39
+ '[&_[data-slot=segment]:focus]:bg-primary/30 [&_[data-slot=segment]:focus]:shadow-none [&_[data-slot=segment]:focus]:outline-none'
40
+ ]
41
+ }
42
+ },
43
+ selectorIcon: /*#__PURE__*/ jsx(CalendarIcon, {
44
+ size: 18,
45
+ color: "tertiary"
46
+ }),
47
+ hourCycle: 24,
48
+ firstDayOfWeek: "sun",
49
+ ...props
50
+ });
51
+ UXDatePicker.displayName = 'UX.DatePicker';
52
+ export { UXDatePicker };
@@ -21,7 +21,8 @@ const UXDateRangePicker = ({ classNames, ...props })=>/*#__PURE__*/ jsx(DateRang
21
21
  separator: 'text-foreground-100',
22
22
  timeInputWrapper: 'bg-content1',
23
23
  timeInput: classes.focus,
24
- selectorButton: 'w-6 h-6 min-w-6 rounded-sm',
24
+ selectorButton: 'w-6 h-6 min-w-6 rounded-sm -mx-1',
25
+ selectorIcon: 'text-secondary',
25
26
  ...classNames
26
27
  },
27
28
  calendarProps: {
@@ -3,14 +3,20 @@ import { extendVariants } from "@heroui/system-rsc";
3
3
  const ExtendedPopover = extendVariants(Popover, {
4
4
  variants: {
5
5
  size: {
6
+ sm: {
7
+ content: '!p-sm max-w-[300px]'
8
+ },
6
9
  md: {
7
- content: 'text-tiny !p-md max-w-[300px]'
10
+ content: '!p-md max-w-[300px]'
11
+ },
12
+ lg: {
13
+ content: '!p-lg max-w-[300px]'
8
14
  }
9
15
  },
10
16
  color: {
11
17
  default: {
12
18
  base: 'before:bg-content1 before:shadow-box',
13
- content: 'bg-content1 text-foreground-300 shadow-box'
19
+ content: 'bg-content1 text-foreground-300 shadow-box text-tiny'
14
20
  }
15
21
  }
16
22
  },
@@ -16,7 +16,7 @@ const ExtendedTooltip = extendVariants(Tooltip, {
16
16
  color: {
17
17
  default: {
18
18
  base: 'before:bg-content1 before:shadow-box',
19
- content: 'bg-content1 text-foreground-300 shadow-box text-tiny leading-1.4 break-all hyphens-manual wrap-break-word'
19
+ content: 'bg-content1 text-foreground-300 shadow-box text-tiny leading-1.4 break-words wrap-break-word'
20
20
  }
21
21
  }
22
22
  },
@@ -20,6 +20,7 @@ export { default as UXCheckbox } from './UXCheckbox';
20
20
  export * from './UXCheckbox';
21
21
  export type { UXChipProps } from './UXChip';
22
22
  export { default as UXChip } from './UXChip';
23
+ export * from './UXDatePicker';
23
24
  export * from './UXDateRangePicker';
24
25
  export type { UXDividerProps } from './UXDivider';
25
26
  export { default as UXDivider } from './UXDivider';
@@ -22,6 +22,7 @@ import UXTooltip from "./UXTooltip/index.js";
22
22
  export * from "./UXButton/index.js";
23
23
  export * from "./UXCalendar/index.js";
24
24
  export * from "./UXCheckbox/index.js";
25
+ export * from "./UXDatePicker/index.js";
25
26
  export * from "./UXDateRangePicker/index.js";
26
27
  export * from "./UXDropdown/index.js";
27
28
  export * from "./UXEmpty/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.1.4-beta.9",
3
+ "version": "0.2.0",
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/lintstaged-config": "0.1.0",
43
- "@particle-network/eslint-config": "0.3.0"
42
+ "@particle-network/eslint-config": "0.3.0",
43
+ "@particle-network/lintstaged-config": "0.1.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.9.0",
@@ -1,7 +0,0 @@
1
- import type React from 'react';
2
- import { type PopoverProps } from '@heroui/popover';
3
- type ExtendedPopoverProps = Omit<PopoverProps, 'color'> & {
4
- color?: 'default';
5
- };
6
- declare const ExtendedPopover: React.ForwardRefExoticComponent<ExtendedPopoverProps>;
7
- export default ExtendedPopover;
@@ -1,26 +0,0 @@
1
- import { Popover } from "@heroui/popover";
2
- import { extendVariants } from "@heroui/system-rsc";
3
- const ExtendedPopover = extendVariants(Popover, {
4
- variants: {
5
- size: {
6
- md: {
7
- content: 'text-tiny !p-md max-w-[300px]'
8
- }
9
- },
10
- color: {
11
- default: {
12
- base: 'before:bg-content1 before:shadow-box',
13
- content: 'bg-content1 text-foreground-300 shadow-box'
14
- }
15
- }
16
- },
17
- defaultVariants: {
18
- color: 'default',
19
- radius: 'md',
20
- size: 'md',
21
- shadow: 'md',
22
- backdrop: 'transparent'
23
- }
24
- });
25
- const date_range_picker_extend = ExtendedPopover;
26
- export { date_range_picker_extend as default };