@plexui/ui 0.9.0 → 0.11.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.
@@ -84,7 +84,7 @@
84
84
  position: relative;
85
85
  min-width: 0;
86
86
  }.Title {
87
- margin: 0;
87
+ margin: 0 0 calc(var(--spacing) * 1.5);
88
88
  color: var(--card-title-color);
89
89
  font-size: var(--card-title-font-size);
90
90
  font-weight: var(--card-title-font-weight);
@@ -92,7 +92,7 @@
92
92
  letter-spacing: var(--font-heading-xs-tracking);
93
93
  text-wrap: balance;
94
94
  }.Description {
95
- margin: 0;
95
+ margin: calc(calc(var(--spacing) * 1.5) * -1) 0 0;
96
96
  color: var(--card-description-color);
97
97
  font-size: var(--card-description-font-size);
98
98
  line-height: var(--font-text-sm-line-height);
@@ -53,6 +53,7 @@
53
53
  --badge-background-color: var(--color-background-danger-soft);
54
54
  --badge-text-color: var(--color-text-danger-soft);
55
55
  }.Title {
56
+ margin: 0 0 calc(var(--spacing) * 2);
56
57
  color: var(--color-text);
57
58
  font-size: var(--font-heading-xs-size);
58
59
  font-weight: var(--font-weight-semibold);
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import clsx from "clsx";
4
+ import {} from "react";
5
+ import { Label as RadixLabel } from "radix-ui";
6
+ import s from "./Label.module.css";
7
+ export const Label = ({ className, children, ...restProps }) => {
8
+ return (_jsx(RadixLabel.Root, { className: clsx(s.Label, className), ...restProps, children: children }));
9
+ };
10
+ //# sourceMappingURL=Label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAuB,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,CAAC,MAAM,oBAAoB,CAAA;AAMlC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAc,EAAE,EAAE;IACzE,OAAO,CACL,KAAC,UAAU,CAAC,IAAI,IAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,KAAM,SAAS,YAChE,QAAQ,GACO,CACnB,CAAA;AACH,CAAC,CAAA","sourcesContent":["\"use client\"\n\nimport clsx from \"clsx\"\nimport { type ComponentProps } from \"react\"\nimport { Label as RadixLabel } from \"radix-ui\"\nimport s from \"./Label.module.css\"\n\nexport type LabelProps = ComponentProps<typeof RadixLabel.Root> & {\n className?: string\n}\n\nexport const Label = ({ className, children, ...restProps }: LabelProps) => {\n return (\n <RadixLabel.Root className={clsx(s.Label, className)} {...restProps}>\n {children}\n </RadixLabel.Root>\n )\n}\n"]}
@@ -0,0 +1,16 @@
1
+ @layer components {.Label {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ gap: calc(var(--spacing) * 0.5);
5
+ color: var(--label-color);
6
+ font-size: var(--label-font-size);
7
+ font-weight: var(--label-font-weight);
8
+ line-height: var(--label-line-height);
9
+ cursor: default;
10
+ }
11
+
12
+ .Label:where([data-disabled]) {
13
+ opacity: 0.6;
14
+ cursor: not-allowed;
15
+ }
16
+ }
@@ -0,0 +1,2 @@
1
+ export { Label } from "./Label";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Label/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAA","sourcesContent":["export { Label, type LabelProps } from \"./Label\"\n"]}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import clsx from "clsx";
4
+ import {} from "react";
5
+ import { Progress as RadixProgress } from "radix-ui";
6
+ import s from "./Progress.module.css";
7
+ export const Progress = ({ value = null, max = 100, className, ...restProps }) => {
8
+ const resolved = value == null ? null : Math.max(0, Math.min(max, value));
9
+ const percentage = resolved == null ? null : (resolved / max) * 100;
10
+ return (_jsx(RadixProgress.Root, { value: resolved, max: max, className: clsx(s.Root, className), ...restProps, children: _jsx(RadixProgress.Indicator, { className: s.Indicator, style: {
11
+ transform: percentage == null ? undefined : `translateX(-${100 - percentage}%)`,
12
+ }, "data-indeterminate": percentage == null ? "" : undefined }) }));
13
+ };
14
+ //# sourceMappingURL=Progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Progress.js","sourceRoot":"","sources":["../../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAuB,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,CAAC,MAAM,uBAAuB,CAAA;AAmBrC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,KAAK,GAAG,IAAI,EACZ,GAAG,GAAG,GAAG,EACT,SAAS,EACT,GAAG,SAAS,EACE,EAAE,EAAE;IAClB,MAAM,QAAQ,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;IACzE,MAAM,UAAU,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;IAEnE,OAAO,CACL,KAAC,aAAa,CAAC,IAAI,IACjB,KAAK,EAAE,QAAQ,EACf,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,KAC9B,SAAS,YAEb,KAAC,aAAa,CAAC,SAAS,IACtB,SAAS,EAAE,CAAC,CAAC,SAAS,EACtB,KAAK,EAAE;gBACL,SAAS,EACP,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,GAAG,GAAG,UAAU,IAAI;aACvE,wBACmB,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,GACvD,GACiB,CACtB,CAAA;AACH,CAAC,CAAA","sourcesContent":["\"use client\"\n\nimport clsx from \"clsx\"\nimport { type ComponentProps } from \"react\"\nimport { Progress as RadixProgress } from \"radix-ui\"\nimport s from \"./Progress.module.css\"\n\nexport type ProgressProps = Omit<\n ComponentProps<typeof RadixProgress.Root>,\n \"children\"\n> & {\n /**\n * Current progress value, between `0` and `max`.\n * Omit (or pass `null`) for an indeterminate state.\n */\n value?: number | null\n /**\n * Maximum value.\n * @default 100\n */\n max?: number\n className?: string\n}\n\nexport const Progress = ({\n value = null,\n max = 100,\n className,\n ...restProps\n}: ProgressProps) => {\n const resolved = value == null ? null : Math.max(0, Math.min(max, value))\n const percentage = resolved == null ? null : (resolved / max) * 100\n\n return (\n <RadixProgress.Root\n value={resolved}\n max={max}\n className={clsx(s.Root, className)}\n {...restProps}\n >\n <RadixProgress.Indicator\n className={s.Indicator}\n style={{\n transform:\n percentage == null ? undefined : `translateX(-${100 - percentage}%)`,\n }}\n data-indeterminate={percentage == null ? \"\" : undefined}\n />\n </RadixProgress.Root>\n )\n}\n"]}
@@ -0,0 +1,33 @@
1
+ @layer components {.Root {
2
+ position: relative;
3
+ overflow: hidden;
4
+ width: 100%;
5
+ height: var(--progress-height);
6
+ background: var(--progress-track-color);
7
+ border-radius: var(--progress-radius);
8
+ /* Prevent accidental clipping of the translateX indicator */
9
+ transform: translateZ(0);
10
+ }.Indicator {
11
+ width: 100%;
12
+ height: 100%;
13
+ background: var(--progress-indicator-color);
14
+ transition: transform var(--progress-transition-duration) var(--progress-transition-ease);
15
+ }
16
+
17
+ /* Indeterminate — sweeping animation */
18
+ .Indicator:where([data-indeterminate]) {
19
+ transform: translateX(-100%);
20
+ animation: progress-sweep var(--progress-indeterminate-duration) ease-in-out infinite;
21
+ width: 40%;
22
+ }@keyframes progress-sweep {
23
+ 0% {
24
+ transform: translateX(-100%);
25
+ }
26
+ 50% {
27
+ transform: translateX(150%);
28
+ }
29
+ 100% {
30
+ transform: translateX(-100%);
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,2 @@
1
+ export { Progress } from "./Progress";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Progress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAA","sourcesContent":["export { Progress, type ProgressProps } from \"./Progress\"\n"]}
@@ -102,6 +102,25 @@
102
102
  --card-description-color: var(--color-text-tertiary);
103
103
  --card-description-font-size: var(--font-text-sm-size);
104
104
 
105
+ /* =============================================
106
+ Label
107
+ ============================================= */
108
+ --label-color: var(--color-text);
109
+ --label-font-size: var(--font-text-sm-size);
110
+ --label-font-weight: var(--font-weight-medium);
111
+ --label-line-height: 1;
112
+
113
+ /* =============================================
114
+ Progress
115
+ ============================================= */
116
+ --progress-height: 4px;
117
+ --progress-radius: var(--radius-full);
118
+ --progress-track-color: var(--color-background-secondary-soft);
119
+ --progress-indicator-color: var(--color-text);
120
+ --progress-transition-duration: var(--transition-duration-basic);
121
+ --progress-transition-ease: var(--transition-ease-basic);
122
+ --progress-indeterminate-duration: 1.5s;
123
+
105
124
  /* =============================================
106
125
  Separator
107
126
  ============================================= */
@@ -0,0 +1,6 @@
1
+ import { type ComponentProps } from "react";
2
+ import { Label as RadixLabel } from "radix-ui";
3
+ export type LabelProps = ComponentProps<typeof RadixLabel.Root> & {
4
+ className?: string;
5
+ };
6
+ export declare const Label: ({ className, children, ...restProps }: LabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Label, type LabelProps } from "./Label";
@@ -0,0 +1,16 @@
1
+ import { type ComponentProps } from "react";
2
+ import { Progress as RadixProgress } from "radix-ui";
3
+ export type ProgressProps = Omit<ComponentProps<typeof RadixProgress.Root>, "children"> & {
4
+ /**
5
+ * Current progress value, between `0` and `max`.
6
+ * Omit (or pass `null`) for an indeterminate state.
7
+ */
8
+ value?: number | null;
9
+ /**
10
+ * Maximum value.
11
+ * @default 100
12
+ */
13
+ max?: number;
14
+ className?: string;
15
+ };
16
+ export declare const Progress: ({ value, max, className, ...restProps }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Progress, type ProgressProps } from "./Progress";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/ui",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Modern design system for building high-quality applications",
5
5
  "type": "module",
6
6
  "license": "MIT",