@northslopetech/altitude-ui 2.0.2 → 2.0.4
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/dist/index.d.mts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +9 -36
- package/dist/index.mjs +9 -35
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -130,9 +130,6 @@ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttri
|
|
|
130
130
|
declare const tabsVariants: (props?: ({
|
|
131
131
|
variant?: "default" | null | undefined;
|
|
132
132
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
133
|
-
declare const tabsListVariants: (props?: ({
|
|
134
|
-
variant?: "default" | null | undefined;
|
|
135
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
136
133
|
interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
137
134
|
value: string;
|
|
138
135
|
onValueChange: (value: string) => void;
|
|
@@ -152,4 +149,4 @@ interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
152
149
|
}
|
|
153
150
|
declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
154
151
|
|
|
155
|
-
export { Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, DatePicker, type DatePickerProps, FormField, type FormFieldProps, TypedInput as Input, type InputFieldProps, type InputProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, type TextareaFieldProps, Typography, type TypographyProps, Upload, type UploadProps, badgeVariants, buttonVariants, checkboxVariants, datePickerTriggerVariants, inputVariants, selectTriggerVariants,
|
|
152
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, DatePicker, type DatePickerProps, FormField, type FormFieldProps, TypedInput as Input, type InputFieldProps, type InputProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, type TextareaFieldProps, Typography, type TypographyProps, Upload, type UploadProps, badgeVariants, buttonVariants, checkboxVariants, datePickerTriggerVariants, inputVariants, selectTriggerVariants, tabsVariants, typographyVariants, uploadVariants };
|
package/dist/index.d.ts
CHANGED
|
@@ -130,9 +130,6 @@ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttri
|
|
|
130
130
|
declare const tabsVariants: (props?: ({
|
|
131
131
|
variant?: "default" | null | undefined;
|
|
132
132
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
133
|
-
declare const tabsListVariants: (props?: ({
|
|
134
|
-
variant?: "default" | null | undefined;
|
|
135
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
136
133
|
interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
137
134
|
value: string;
|
|
138
135
|
onValueChange: (value: string) => void;
|
|
@@ -152,4 +149,4 @@ interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
152
149
|
}
|
|
153
150
|
declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
154
151
|
|
|
155
|
-
export { Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, DatePicker, type DatePickerProps, FormField, type FormFieldProps, TypedInput as Input, type InputFieldProps, type InputProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, type TextareaFieldProps, Typography, type TypographyProps, Upload, type UploadProps, badgeVariants, buttonVariants, checkboxVariants, datePickerTriggerVariants, inputVariants, selectTriggerVariants,
|
|
152
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, DatePicker, type DatePickerProps, FormField, type FormFieldProps, TypedInput as Input, type InputFieldProps, type InputProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, type TextareaFieldProps, Typography, type TypographyProps, Upload, type UploadProps, badgeVariants, buttonVariants, checkboxVariants, datePickerTriggerVariants, inputVariants, selectTriggerVariants, tabsVariants, typographyVariants, uploadVariants };
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,6 @@ __export(index_exports, {
|
|
|
58
58
|
datePickerTriggerVariants: () => datePickerTriggerVariants,
|
|
59
59
|
inputVariants: () => inputVariants,
|
|
60
60
|
selectTriggerVariants: () => selectTriggerVariants,
|
|
61
|
-
tabsListVariants: () => tabsListVariants,
|
|
62
61
|
tabsVariants: () => tabsVariants,
|
|
63
62
|
typographyVariants: () => typographyVariants,
|
|
64
63
|
uploadVariants: () => uploadVariants
|
|
@@ -1270,7 +1269,7 @@ var tabsVariants = (0, import_class_variance_authority10.cva)(
|
|
|
1270
1269
|
{
|
|
1271
1270
|
variants: {
|
|
1272
1271
|
variant: {
|
|
1273
|
-
default: "border-b-2 border-
|
|
1272
|
+
default: "border-b-2 border-transparent hover:border-interactive data-[state=active]:border-interactive data-[state=active]:text-primary disabled:border-subtle disabled:text-muted disabled:cursor-not-allowed"
|
|
1274
1273
|
}
|
|
1275
1274
|
},
|
|
1276
1275
|
defaultVariants: {
|
|
@@ -1278,16 +1277,6 @@ var tabsVariants = (0, import_class_variance_authority10.cva)(
|
|
|
1278
1277
|
}
|
|
1279
1278
|
}
|
|
1280
1279
|
);
|
|
1281
|
-
var tabsListVariants = (0, import_class_variance_authority10.cva)("inline-flex items-center justify-center", {
|
|
1282
|
-
variants: {
|
|
1283
|
-
variant: {
|
|
1284
|
-
default: "border-b border-secondary"
|
|
1285
|
-
}
|
|
1286
|
-
},
|
|
1287
|
-
defaultVariants: {
|
|
1288
|
-
variant: "default"
|
|
1289
|
-
}
|
|
1290
|
-
});
|
|
1291
1280
|
var TabsContext = React10.createContext(
|
|
1292
1281
|
void 0
|
|
1293
1282
|
);
|
|
@@ -1307,19 +1296,13 @@ var Tabs = React10.forwardRef((props, ref) => {
|
|
|
1307
1296
|
children,
|
|
1308
1297
|
...restProps
|
|
1309
1298
|
} = props;
|
|
1310
|
-
const handleValueChange = React10.useCallback(
|
|
1311
|
-
(newValue) => {
|
|
1312
|
-
onValueChange(newValue);
|
|
1313
|
-
},
|
|
1314
|
-
[onValueChange]
|
|
1315
|
-
);
|
|
1316
1299
|
const contextValue = React10.useMemo(
|
|
1317
1300
|
() => ({
|
|
1318
1301
|
activeTab: value,
|
|
1319
|
-
setActiveTab:
|
|
1302
|
+
setActiveTab: onValueChange,
|
|
1320
1303
|
variant
|
|
1321
1304
|
}),
|
|
1322
|
-
[value,
|
|
1305
|
+
[value, onValueChange, variant]
|
|
1323
1306
|
);
|
|
1324
1307
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref, className: cn("w-full", className), ...restProps, children }) });
|
|
1325
1308
|
});
|
|
@@ -1327,17 +1310,12 @@ Tabs.displayName = "Tabs";
|
|
|
1327
1310
|
var TabsList = React10.forwardRef(
|
|
1328
1311
|
(props, ref) => {
|
|
1329
1312
|
const { className, children, ...restProps } = props;
|
|
1330
|
-
const { variant } = useTabsContext();
|
|
1331
|
-
const tabsListClassName = React10.useMemo(
|
|
1332
|
-
() => cn(tabsListVariants({ variant }), className),
|
|
1333
|
-
[variant, className]
|
|
1334
|
-
);
|
|
1335
1313
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1336
1314
|
"div",
|
|
1337
1315
|
{
|
|
1338
1316
|
ref,
|
|
1339
1317
|
role: "tablist",
|
|
1340
|
-
className:
|
|
1318
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
1341
1319
|
...restProps,
|
|
1342
1320
|
children
|
|
1343
1321
|
}
|
|
@@ -1345,8 +1323,8 @@ var TabsList = React10.forwardRef(
|
|
|
1345
1323
|
}
|
|
1346
1324
|
);
|
|
1347
1325
|
TabsList.displayName = "TabsList";
|
|
1348
|
-
var getTabTypographyStyles = () => ({
|
|
1349
|
-
font: "var(--typography-label-sm-bold)"
|
|
1326
|
+
var getTabTypographyStyles = (isActive) => ({
|
|
1327
|
+
font: isActive ? "var(--typography-label-sm-bold)" : "var(--typography-label-sm-regular)"
|
|
1350
1328
|
});
|
|
1351
1329
|
var TabsTrigger = React10.forwardRef(
|
|
1352
1330
|
(props, ref) => {
|
|
@@ -1358,10 +1336,10 @@ var TabsTrigger = React10.forwardRef(
|
|
|
1358
1336
|
const isActive = activeTab === value;
|
|
1359
1337
|
const tokenStyles = React10.useMemo(
|
|
1360
1338
|
() => ({
|
|
1361
|
-
...getTabTypographyStyles(),
|
|
1339
|
+
...getTabTypographyStyles(isActive),
|
|
1362
1340
|
...style
|
|
1363
1341
|
}),
|
|
1364
|
-
[style]
|
|
1342
|
+
[isActive, style]
|
|
1365
1343
|
);
|
|
1366
1344
|
const triggerClassName = React10.useMemo(
|
|
1367
1345
|
() => cn(tabsVariants({ variant }), className),
|
|
@@ -1399,10 +1377,6 @@ var TabsContent = React10.forwardRef(
|
|
|
1399
1377
|
throw new Error("TabsContent must have a value prop");
|
|
1400
1378
|
}
|
|
1401
1379
|
const isActive = activeTab === value;
|
|
1402
|
-
const contentClassName = React10.useMemo(
|
|
1403
|
-
() => cn("mt-6", className),
|
|
1404
|
-
[className]
|
|
1405
|
-
);
|
|
1406
1380
|
if (!isActive) {
|
|
1407
1381
|
return null;
|
|
1408
1382
|
}
|
|
@@ -1414,7 +1388,7 @@ var TabsContent = React10.forwardRef(
|
|
|
1414
1388
|
id: `tabpanel-${value}`,
|
|
1415
1389
|
"aria-labelledby": `tab-${value}`,
|
|
1416
1390
|
tabIndex: 0,
|
|
1417
|
-
className:
|
|
1391
|
+
className: cn("mt-6", className),
|
|
1418
1392
|
...restProps,
|
|
1419
1393
|
children
|
|
1420
1394
|
}
|
|
@@ -1452,7 +1426,6 @@ TabsContent.displayName = "TabsContent";
|
|
|
1452
1426
|
datePickerTriggerVariants,
|
|
1453
1427
|
inputVariants,
|
|
1454
1428
|
selectTriggerVariants,
|
|
1455
|
-
tabsListVariants,
|
|
1456
1429
|
tabsVariants,
|
|
1457
1430
|
typographyVariants,
|
|
1458
1431
|
uploadVariants
|
package/dist/index.mjs
CHANGED
|
@@ -1203,7 +1203,7 @@ var tabsVariants = cva10(
|
|
|
1203
1203
|
{
|
|
1204
1204
|
variants: {
|
|
1205
1205
|
variant: {
|
|
1206
|
-
default: "border-b-2 border-
|
|
1206
|
+
default: "border-b-2 border-transparent hover:border-interactive data-[state=active]:border-interactive data-[state=active]:text-primary disabled:border-subtle disabled:text-muted disabled:cursor-not-allowed"
|
|
1207
1207
|
}
|
|
1208
1208
|
},
|
|
1209
1209
|
defaultVariants: {
|
|
@@ -1211,16 +1211,6 @@ var tabsVariants = cva10(
|
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
1213
|
);
|
|
1214
|
-
var tabsListVariants = cva10("inline-flex items-center justify-center", {
|
|
1215
|
-
variants: {
|
|
1216
|
-
variant: {
|
|
1217
|
-
default: "border-b border-secondary"
|
|
1218
|
-
}
|
|
1219
|
-
},
|
|
1220
|
-
defaultVariants: {
|
|
1221
|
-
variant: "default"
|
|
1222
|
-
}
|
|
1223
|
-
});
|
|
1224
1214
|
var TabsContext = React10.createContext(
|
|
1225
1215
|
void 0
|
|
1226
1216
|
);
|
|
@@ -1240,19 +1230,13 @@ var Tabs = React10.forwardRef((props, ref) => {
|
|
|
1240
1230
|
children,
|
|
1241
1231
|
...restProps
|
|
1242
1232
|
} = props;
|
|
1243
|
-
const handleValueChange = React10.useCallback(
|
|
1244
|
-
(newValue) => {
|
|
1245
|
-
onValueChange(newValue);
|
|
1246
|
-
},
|
|
1247
|
-
[onValueChange]
|
|
1248
|
-
);
|
|
1249
1233
|
const contextValue = React10.useMemo(
|
|
1250
1234
|
() => ({
|
|
1251
1235
|
activeTab: value,
|
|
1252
|
-
setActiveTab:
|
|
1236
|
+
setActiveTab: onValueChange,
|
|
1253
1237
|
variant
|
|
1254
1238
|
}),
|
|
1255
|
-
[value,
|
|
1239
|
+
[value, onValueChange, variant]
|
|
1256
1240
|
);
|
|
1257
1241
|
return /* @__PURE__ */ jsx9(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx9("div", { ref, className: cn("w-full", className), ...restProps, children }) });
|
|
1258
1242
|
});
|
|
@@ -1260,17 +1244,12 @@ Tabs.displayName = "Tabs";
|
|
|
1260
1244
|
var TabsList = React10.forwardRef(
|
|
1261
1245
|
(props, ref) => {
|
|
1262
1246
|
const { className, children, ...restProps } = props;
|
|
1263
|
-
const { variant } = useTabsContext();
|
|
1264
|
-
const tabsListClassName = React10.useMemo(
|
|
1265
|
-
() => cn(tabsListVariants({ variant }), className),
|
|
1266
|
-
[variant, className]
|
|
1267
|
-
);
|
|
1268
1247
|
return /* @__PURE__ */ jsx9(
|
|
1269
1248
|
"div",
|
|
1270
1249
|
{
|
|
1271
1250
|
ref,
|
|
1272
1251
|
role: "tablist",
|
|
1273
|
-
className:
|
|
1252
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
1274
1253
|
...restProps,
|
|
1275
1254
|
children
|
|
1276
1255
|
}
|
|
@@ -1278,8 +1257,8 @@ var TabsList = React10.forwardRef(
|
|
|
1278
1257
|
}
|
|
1279
1258
|
);
|
|
1280
1259
|
TabsList.displayName = "TabsList";
|
|
1281
|
-
var getTabTypographyStyles = () => ({
|
|
1282
|
-
font: "var(--typography-label-sm-bold)"
|
|
1260
|
+
var getTabTypographyStyles = (isActive) => ({
|
|
1261
|
+
font: isActive ? "var(--typography-label-sm-bold)" : "var(--typography-label-sm-regular)"
|
|
1283
1262
|
});
|
|
1284
1263
|
var TabsTrigger = React10.forwardRef(
|
|
1285
1264
|
(props, ref) => {
|
|
@@ -1291,10 +1270,10 @@ var TabsTrigger = React10.forwardRef(
|
|
|
1291
1270
|
const isActive = activeTab === value;
|
|
1292
1271
|
const tokenStyles = React10.useMemo(
|
|
1293
1272
|
() => ({
|
|
1294
|
-
...getTabTypographyStyles(),
|
|
1273
|
+
...getTabTypographyStyles(isActive),
|
|
1295
1274
|
...style
|
|
1296
1275
|
}),
|
|
1297
|
-
[style]
|
|
1276
|
+
[isActive, style]
|
|
1298
1277
|
);
|
|
1299
1278
|
const triggerClassName = React10.useMemo(
|
|
1300
1279
|
() => cn(tabsVariants({ variant }), className),
|
|
@@ -1332,10 +1311,6 @@ var TabsContent = React10.forwardRef(
|
|
|
1332
1311
|
throw new Error("TabsContent must have a value prop");
|
|
1333
1312
|
}
|
|
1334
1313
|
const isActive = activeTab === value;
|
|
1335
|
-
const contentClassName = React10.useMemo(
|
|
1336
|
-
() => cn("mt-6", className),
|
|
1337
|
-
[className]
|
|
1338
|
-
);
|
|
1339
1314
|
if (!isActive) {
|
|
1340
1315
|
return null;
|
|
1341
1316
|
}
|
|
@@ -1347,7 +1322,7 @@ var TabsContent = React10.forwardRef(
|
|
|
1347
1322
|
id: `tabpanel-${value}`,
|
|
1348
1323
|
"aria-labelledby": `tab-${value}`,
|
|
1349
1324
|
tabIndex: 0,
|
|
1350
|
-
className:
|
|
1325
|
+
className: cn("mt-6", className),
|
|
1351
1326
|
...restProps,
|
|
1352
1327
|
children
|
|
1353
1328
|
}
|
|
@@ -1384,7 +1359,6 @@ export {
|
|
|
1384
1359
|
datePickerTriggerVariants,
|
|
1385
1360
|
inputVariants,
|
|
1386
1361
|
selectTriggerVariants,
|
|
1387
|
-
tabsListVariants,
|
|
1388
1362
|
tabsVariants,
|
|
1389
1363
|
typographyVariants,
|
|
1390
1364
|
uploadVariants
|