@socprime/react-ui 0.0.7 → 0.0.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/README.md CHANGED
@@ -125,7 +125,7 @@ Deep imports such as `@socprime/react-ui/dist/ui/Button` are blocked by the `exp
125
125
  `Aside`, `PageHeader`, `Tabs`, `Accordion`, `AccordionItem`, `AccordionTrigger`, `AccordionContent`, `AccordionSection`, `FolderTreeExpandTrigger`, `ScrollArea`, `ScrollBar`, `Separator`, `TreeGuide`, `TreeRow`
126
126
 
127
127
  **Feedback and state**
128
- `Spinner`, `SpinnerCustom`, `SpinnerSquare`, `AnimatedDots`, `Skeleton`, `ConditionalContent`
128
+ `Spinner`, `SpinnerCustom`, `SpinnerSquare`, `AnimatedDots`, `Skeleton`, `Progress`, `ConditionalContent`
129
129
 
130
130
  **Theming**
131
131
  `ThemeToggle`, `applyTheme`, `useDocumentTheme`, `ThemeName`
package/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
10
10
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
11
11
  import * as LabelPrimitive from '@radix-ui/react-label';
12
12
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
13
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
13
14
  import { Root, Item } from '@radix-ui/react-radio-group';
14
15
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
15
16
  import * as SelectPrimitive from '@radix-ui/react-select';
@@ -450,6 +451,11 @@ type PaginationItemProps = ComponentProps<typeof PaginationItem>;
450
451
  type PaginationNextProps = ComponentProps<typeof PaginationNext>;
451
452
  type PaginationPreviousProps = ComponentProps<typeof PaginationPrevious>;
452
453
 
454
+ interface ProgressProps extends React$1.ComponentProps<typeof ProgressPrimitive.Root> {
455
+ indicatorClassName?: string;
456
+ }
457
+ declare const Progress: React$1.FC<ProgressProps>;
458
+
453
459
  declare function RadioGroup({ className, ...props }: React$1.ComponentProps<typeof Root>): React$1.JSX.Element;
454
460
  declare function RadioGroupItem({ className, ...props }: React$1.ComponentProps<typeof Item>): React$1.JSX.Element;
455
461
 
@@ -555,6 +561,12 @@ interface SpinnerProps extends React.ComponentProps<'svg'> {
555
561
  declare const Spinner: React.FC<SpinnerProps>;
556
562
  declare const SpinnerCustom: React.FC<SpinnerProps>;
557
563
 
564
+ interface SpinnerCircleProps extends React.ComponentProps<'svg'> {
565
+ size?: number;
566
+ strokeWidth?: number;
567
+ }
568
+ declare const SpinnerCircle: React.FC<SpinnerCircleProps>;
569
+
558
570
  type SpinnerSquareProps = {
559
571
  variant?: 'fixed' | 'absolute' | 'default';
560
572
  };
@@ -700,4 +712,4 @@ declare function TreeRow({ className, children, ...props }: ComponentProps<'div'
700
712
  type TreeGuideProps = ComponentProps<typeof TreeGuide>;
701
713
  type TreeRowProps = ComponentProps<typeof TreeRow>;
702
714
 
703
- export { Accordion, type AccordionChevronVariant, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionSection, type AccordionSectionProps, AccordionTrigger, type AccordionTriggerProps, AnimatedDots, type AnimatedDotsProps, Aside, type AsideProps, type AsideTab, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, ConditionalContent, type ConditionalContentProps, ConfirmDeleteDialog, type ConfirmDeleteDialogProps, ConfirmDeleteDialog as ConfirmDialog, DefaultDialog, type DefaultDialogProps, DeleteButtonConfirm, type DeleteButtonConfirmProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuPortalProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, DropdownsCheckbox, type DropdownsCheckboxOption, type DropdownsCheckboxProps, DropdownsSelect, type DropdownsSelectOption, type DropdownsSelectProps, EmptyState, type EmptyStateProps, Field, FieldContent, type FieldContentProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, FieldGroup, type FieldGroupProps, FieldLabel, type FieldLabelProps, FieldLegend, type FieldLegendProps, type FieldProps, FieldSeparator, type FieldSeparatorProps, FieldSet, type FieldSetProps, FieldTitle, type FieldTitleProps, FolderTreeExpandTrigger, type FolderTreeExpandTriggerProps, GroupHeaderRow, type GroupHeaderRowProps, HelperText, type HelperTextProps, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, LabelInfo, type LabelInfoProps, type LabelProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, PaginationWrap, type PaginationWrapProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, ScrollBar, SearchInput, SearchInputFields, type SearchInputFieldsProps, type SearchInputProps, Select, SelectContent, type SelectContentProps, SelectDefault, type SelectDefaultProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, type SeparatorProps, ServerGroupedTableBody, type ServerGroupedTableBodyProps, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Slider, type SliderProps, SortableHeader, type SortableHeaderProps, Spinner, SpinnerCustom, type SpinnerProps, SpinnerSquare, type SpinnerSquareProps, type SuggestionOption, Suggestions, type SuggestionsProps, Switch, type SwitchProps, type TabItem, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, TextTruncate, type TextTruncateProps, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, Toaster, Tooltip, TooltipContent, type TooltipContentProps, TooltipParent, type TooltipParentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TreeGuide, type TreeGuideProps, TreeRow, type TreeRowProps, badgeVariants, buttonVariants };
715
+ export { Accordion, type AccordionChevronVariant, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionSection, type AccordionSectionProps, AccordionTrigger, type AccordionTriggerProps, AnimatedDots, type AnimatedDotsProps, Aside, type AsideProps, type AsideTab, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, ConditionalContent, type ConditionalContentProps, ConfirmDeleteDialog, type ConfirmDeleteDialogProps, ConfirmDeleteDialog as ConfirmDialog, DefaultDialog, type DefaultDialogProps, DeleteButtonConfirm, type DeleteButtonConfirmProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuPortalProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, DropdownsCheckbox, type DropdownsCheckboxOption, type DropdownsCheckboxProps, DropdownsSelect, type DropdownsSelectOption, type DropdownsSelectProps, EmptyState, type EmptyStateProps, Field, FieldContent, type FieldContentProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, FieldGroup, type FieldGroupProps, FieldLabel, type FieldLabelProps, FieldLegend, type FieldLegendProps, type FieldProps, FieldSeparator, type FieldSeparatorProps, FieldSet, type FieldSetProps, FieldTitle, type FieldTitleProps, FolderTreeExpandTrigger, type FolderTreeExpandTriggerProps, GroupHeaderRow, type GroupHeaderRowProps, HelperText, type HelperTextProps, Input, InputNumber, type InputNumberProps, InputPassword, type InputPasswordProps, type InputProps, Label, LabelInfo, type LabelInfoProps, type LabelProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, PageHeader, type PageHeaderProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, PaginationWrap, type PaginationWrapProps, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, ScrollBar, SearchInput, SearchInputFields, type SearchInputFieldsProps, type SearchInputProps, Select, SelectContent, type SelectContentProps, SelectDefault, type SelectDefaultProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, type SeparatorProps, ServerGroupedTableBody, type ServerGroupedTableBodyProps, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Slider, type SliderProps, SortableHeader, type SortableHeaderProps, Spinner, SpinnerCircle, type SpinnerCircleProps, SpinnerCustom, type SpinnerProps, SpinnerSquare, type SpinnerSquareProps, type SuggestionOption, Suggestions, type SuggestionsProps, Switch, type SwitchProps, type TabItem, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, TextTruncate, type TextTruncateProps, Textarea, type TextareaProps, ThemeToggle, type ThemeToggleProps, Toaster, Tooltip, TooltipContent, type TooltipContentProps, TooltipParent, type TooltipParentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TreeGuide, type TreeGuideProps, TreeRow, type TreeRowProps, badgeVariants, buttonVariants };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socprime/react-ui",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "SOC Prime React UI component library and Storybook design system.",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -92,6 +92,7 @@
92
92
  "@radix-ui/react-label": "^2.1.8",
93
93
  "@radix-ui/react-navigation-menu": "^1.2.14",
94
94
  "@radix-ui/react-popover": "^1.1.15",
95
+ "@radix-ui/react-progress": "^1.1.8",
95
96
  "@radix-ui/react-radio-group": "^1.3.8",
96
97
  "@radix-ui/react-scroll-area": "^1.2.10",
97
98
  "@radix-ui/react-select": "^2.2.6",
@@ -0,0 +1,33 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
3
+ import { cn } from "../../lib/cn.js";
4
+ const Progress = ({
5
+ className,
6
+ value,
7
+ max = 100,
8
+ indicatorClassName,
9
+ ...props
10
+ }) => {
11
+ const percentage = max > 0 ? Math.min(100, Math.max(0, (value ?? 0) / max * 100)) : 0;
12
+ return /* @__PURE__ */ jsx(
13
+ ProgressPrimitive.Root,
14
+ {
15
+ "data-slot": "progress",
16
+ className: cn("bg-border relative h-1.5 w-full overflow-hidden rounded-full", className),
17
+ value,
18
+ max,
19
+ ...props,
20
+ children: /* @__PURE__ */ jsx(
21
+ ProgressPrimitive.Indicator,
22
+ {
23
+ "data-slot": "progress-indicator",
24
+ className: cn("bg-btn-primary h-full w-full flex-1 transition-all", indicatorClassName),
25
+ style: { transform: `translateX(-${100 - percentage}%)` }
26
+ }
27
+ )
28
+ }
29
+ );
30
+ };
31
+ export {
32
+ Progress
33
+ };
@@ -0,0 +1,4 @@
1
+ import { Progress } from "./Progress.js";
2
+ export {
3
+ Progress
4
+ };
@@ -0,0 +1,43 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ const VIEWBOX = 16;
4
+ const RADIUS = 6.5;
5
+ const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
6
+ const ARC_RATIO = 0.75;
7
+ const SpinnerCircle = ({
8
+ className,
9
+ size = 12,
10
+ strokeWidth = 1.5,
11
+ ...props
12
+ }) => {
13
+ const dash = CIRCUMFERENCE * ARC_RATIO;
14
+ const gap = CIRCUMFERENCE - dash;
15
+ return /* @__PURE__ */ jsx(
16
+ "svg",
17
+ {
18
+ role: "status",
19
+ "aria-label": "Loading",
20
+ width: size,
21
+ height: size,
22
+ viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}`,
23
+ fill: "none",
24
+ className: cn("shrink-0 animate-spin text-success", className),
25
+ ...props,
26
+ children: /* @__PURE__ */ jsx(
27
+ "circle",
28
+ {
29
+ cx: VIEWBOX / 2,
30
+ cy: VIEWBOX / 2,
31
+ r: RADIUS,
32
+ stroke: "currentColor",
33
+ strokeWidth,
34
+ strokeLinecap: "round",
35
+ strokeDasharray: `${dash} ${gap}`
36
+ }
37
+ )
38
+ }
39
+ );
40
+ };
41
+ export {
42
+ SpinnerCircle
43
+ };
@@ -0,0 +1,4 @@
1
+ import { SpinnerCircle } from "./SpinnerCircle.js";
2
+ export {
3
+ SpinnerCircle
4
+ };
package/ui/index.js CHANGED
@@ -18,6 +18,7 @@ export * from "./Label/index.js";
18
18
  export * from "./MultiSelect/index.js";
19
19
  export * from "./PageHeader/index.js";
20
20
  export * from "./Pagination/index.js";
21
+ export * from "./Progress/index.js";
21
22
  export * from "./RadioGroup/index.js";
22
23
  export * from "./ScrollArea/index.js";
23
24
  export * from "./SearchInput/index.js";
@@ -27,6 +28,7 @@ export * from "./Separator/index.js";
27
28
  export * from "./Skeleton/index.js";
28
29
  export * from "./Slider/index.js";
29
30
  export * from "./Spinner/index.js";
31
+ export * from "./SpinnerCircle/index.js";
30
32
  export * from "./SpinnerSquare/index.js";
31
33
  export * from "./Suggestions/index.js";
32
34
  export * from "./Switch/index.js";