@sikka/hawa 0.27.24-next → 0.28.0-next
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/blocks/index.js +87 -20
- package/dist/blocks/index.mjs +1 -1
- package/dist/blocks/misc/index.js +87 -20
- package/dist/blocks/misc/index.mjs +87 -20
- package/dist/{chunk-3ZURZ4TW.mjs → chunk-Y3HUZNCH.mjs} +87 -20
- package/dist/elements/index.d.mts +2 -1
- package/dist/elements/index.d.ts +2 -1
- package/dist/elements/index.js +87 -20
- package/dist/elements/index.mjs +1 -1
- package/dist/index.css +26 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +87 -20
- package/dist/index.mjs +87 -20
- package/dist/tabs/index.d.mts +2 -1
- package/dist/tabs/index.d.ts +2 -1
- package/dist/tabs/index.js +89 -20
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +89 -20
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/blocks/index.js
CHANGED
@@ -5294,6 +5294,7 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
5294
5294
|
// elements/tabs/Tabs.tsx
|
5295
5295
|
var React35 = __toESM(require("react"));
|
5296
5296
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
5297
|
+
var import_tailwind_variants = require("tailwind-variants");
|
5297
5298
|
|
5298
5299
|
// elements/chip/Chip.tsx
|
5299
5300
|
var import_react27 = __toESM(require("react"));
|
@@ -5377,31 +5378,99 @@ var Chip = import_react27.default.forwardRef(
|
|
5377
5378
|
);
|
5378
5379
|
|
5379
5380
|
// elements/tabs/Tabs.tsx
|
5380
|
-
var
|
5381
|
-
|
5382
|
-
|
5383
|
-
|
5381
|
+
var tabsListVariant = (0, import_tailwind_variants.tv)({
|
5382
|
+
base: "",
|
5383
|
+
variants: {
|
5384
|
+
variant: {
|
5385
|
+
default: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
5386
|
+
underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
5387
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
5388
|
+
},
|
5389
|
+
orientation: {
|
5390
|
+
horizontal: "",
|
5391
|
+
vertical: ""
|
5392
|
+
}
|
5393
|
+
},
|
5394
|
+
compoundVariants: [
|
5384
5395
|
{
|
5385
|
-
|
5386
|
-
|
5387
|
-
|
5388
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
5389
|
-
className
|
5390
|
-
),
|
5391
|
-
...props
|
5396
|
+
variant: "underlined_tabs",
|
5397
|
+
orientation: "vertical",
|
5398
|
+
class: "hawa-border-e-2 hawa-border-e-primary"
|
5392
5399
|
},
|
5393
|
-
|
5394
|
-
|
5395
|
-
|
5400
|
+
{
|
5401
|
+
variant: "underlined_tabs",
|
5402
|
+
orientation: "horizontal",
|
5403
|
+
class: "hawa-border-b-2 hawa-border-b-primary"
|
5404
|
+
}
|
5405
|
+
],
|
5406
|
+
defaultVariants: {
|
5407
|
+
variant: "default",
|
5408
|
+
orientation: "horizontal"
|
5409
|
+
}
|
5410
|
+
});
|
5411
|
+
var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
5412
|
+
base: "",
|
5413
|
+
variants: {
|
5414
|
+
variant: {
|
5415
|
+
default: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
5416
|
+
underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
5417
|
+
underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
|
5418
|
+
},
|
5419
|
+
orientation: {
|
5420
|
+
horizontal: "",
|
5421
|
+
vertical: ""
|
5422
|
+
}
|
5423
|
+
},
|
5424
|
+
compoundVariants: [
|
5425
|
+
{
|
5426
|
+
variant: "underlined",
|
5427
|
+
orientation: "horizontal",
|
5428
|
+
class: "data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2"
|
5429
|
+
},
|
5430
|
+
{
|
5431
|
+
variant: "underlined",
|
5432
|
+
orientation: "vertical",
|
5433
|
+
class: "data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2"
|
5434
|
+
},
|
5435
|
+
{
|
5436
|
+
variant: "underlined_tabs",
|
5437
|
+
orientation: "horizontal",
|
5438
|
+
class: "hawa-rounded-b-none"
|
5439
|
+
},
|
5440
|
+
{
|
5441
|
+
variant: "underlined_tabs",
|
5442
|
+
orientation: "vertical",
|
5443
|
+
class: "hawa-rounded-e-none"
|
5444
|
+
}
|
5445
|
+
],
|
5446
|
+
defaultVariants: {
|
5447
|
+
variant: "default",
|
5448
|
+
orientation: "horizontal"
|
5449
|
+
}
|
5450
|
+
});
|
5451
|
+
var TabsContext = React35.createContext({ orientation: "horizontal", variant: "default" });
|
5452
|
+
var Tabs = React35.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
5453
|
+
TabsPrimitive.Root,
|
5454
|
+
{
|
5455
|
+
ref,
|
5456
|
+
className: cn(
|
5457
|
+
"hawa-flex hawa-gap-2",
|
5458
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
5459
|
+
className
|
5460
|
+
),
|
5461
|
+
...props
|
5462
|
+
},
|
5463
|
+
/* @__PURE__ */ React35.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
5464
|
+
));
|
5396
5465
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
5397
5466
|
var TabsList = React35.forwardRef(({ className, ...props }, ref) => {
|
5398
|
-
const { orientation } = React35.useContext(TabsContext);
|
5467
|
+
const { orientation, variant } = React35.useContext(TabsContext);
|
5399
5468
|
return /* @__PURE__ */ React35.createElement(
|
5400
5469
|
TabsPrimitive.List,
|
5401
5470
|
{
|
5402
5471
|
ref,
|
5403
5472
|
className: cn(
|
5404
|
-
|
5473
|
+
tabsListVariant({ variant, orientation }),
|
5405
5474
|
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
5406
5475
|
className
|
5407
5476
|
),
|
@@ -5411,14 +5480,12 @@ var TabsList = React35.forwardRef(({ className, ...props }, ref) => {
|
|
5411
5480
|
});
|
5412
5481
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
5413
5482
|
var TabsTrigger = React35.forwardRef(({ className, chipProps, ...props }, ref) => {
|
5483
|
+
const { orientation, variant } = React35.useContext(TabsContext);
|
5414
5484
|
return /* @__PURE__ */ React35.createElement(
|
5415
5485
|
TabsPrimitive.Trigger,
|
5416
5486
|
{
|
5417
5487
|
ref,
|
5418
|
-
className: cn(
|
5419
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
5420
|
-
className
|
5421
|
-
),
|
5488
|
+
className: cn(tabsTriggerVariant({ variant, orientation }), className),
|
5422
5489
|
...props
|
5423
5490
|
},
|
5424
5491
|
props.children,
|
package/dist/blocks/index.mjs
CHANGED
@@ -97,6 +97,7 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
97
97
|
// elements/tabs/Tabs.tsx
|
98
98
|
var React3 = __toESM(require("react"));
|
99
99
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
100
|
+
var import_tailwind_variants = require("tailwind-variants");
|
100
101
|
|
101
102
|
// elements/chip/Chip.tsx
|
102
103
|
var import_react = __toESM(require("react"));
|
@@ -180,31 +181,99 @@ var Chip = import_react.default.forwardRef(
|
|
180
181
|
);
|
181
182
|
|
182
183
|
// elements/tabs/Tabs.tsx
|
183
|
-
var
|
184
|
-
|
185
|
-
|
186
|
-
|
184
|
+
var tabsListVariant = (0, import_tailwind_variants.tv)({
|
185
|
+
base: "",
|
186
|
+
variants: {
|
187
|
+
variant: {
|
188
|
+
default: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
189
|
+
underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
190
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
191
|
+
},
|
192
|
+
orientation: {
|
193
|
+
horizontal: "",
|
194
|
+
vertical: ""
|
195
|
+
}
|
196
|
+
},
|
197
|
+
compoundVariants: [
|
187
198
|
{
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
192
|
-
className
|
193
|
-
),
|
194
|
-
...props
|
199
|
+
variant: "underlined_tabs",
|
200
|
+
orientation: "vertical",
|
201
|
+
class: "hawa-border-e-2 hawa-border-e-primary"
|
195
202
|
},
|
196
|
-
|
197
|
-
|
198
|
-
|
203
|
+
{
|
204
|
+
variant: "underlined_tabs",
|
205
|
+
orientation: "horizontal",
|
206
|
+
class: "hawa-border-b-2 hawa-border-b-primary"
|
207
|
+
}
|
208
|
+
],
|
209
|
+
defaultVariants: {
|
210
|
+
variant: "default",
|
211
|
+
orientation: "horizontal"
|
212
|
+
}
|
213
|
+
});
|
214
|
+
var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
215
|
+
base: "",
|
216
|
+
variants: {
|
217
|
+
variant: {
|
218
|
+
default: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
219
|
+
underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
220
|
+
underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
|
221
|
+
},
|
222
|
+
orientation: {
|
223
|
+
horizontal: "",
|
224
|
+
vertical: ""
|
225
|
+
}
|
226
|
+
},
|
227
|
+
compoundVariants: [
|
228
|
+
{
|
229
|
+
variant: "underlined",
|
230
|
+
orientation: "horizontal",
|
231
|
+
class: "data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
variant: "underlined",
|
235
|
+
orientation: "vertical",
|
236
|
+
class: "data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2"
|
237
|
+
},
|
238
|
+
{
|
239
|
+
variant: "underlined_tabs",
|
240
|
+
orientation: "horizontal",
|
241
|
+
class: "hawa-rounded-b-none"
|
242
|
+
},
|
243
|
+
{
|
244
|
+
variant: "underlined_tabs",
|
245
|
+
orientation: "vertical",
|
246
|
+
class: "hawa-rounded-e-none"
|
247
|
+
}
|
248
|
+
],
|
249
|
+
defaultVariants: {
|
250
|
+
variant: "default",
|
251
|
+
orientation: "horizontal"
|
252
|
+
}
|
253
|
+
});
|
254
|
+
var TabsContext = React3.createContext({ orientation: "horizontal", variant: "default" });
|
255
|
+
var Tabs = React3.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
256
|
+
TabsPrimitive.Root,
|
257
|
+
{
|
258
|
+
ref,
|
259
|
+
className: cn(
|
260
|
+
"hawa-flex hawa-gap-2",
|
261
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
262
|
+
className
|
263
|
+
),
|
264
|
+
...props
|
265
|
+
},
|
266
|
+
/* @__PURE__ */ React3.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
267
|
+
));
|
199
268
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
200
269
|
var TabsList = React3.forwardRef(({ className, ...props }, ref) => {
|
201
|
-
const { orientation } = React3.useContext(TabsContext);
|
270
|
+
const { orientation, variant } = React3.useContext(TabsContext);
|
202
271
|
return /* @__PURE__ */ React3.createElement(
|
203
272
|
TabsPrimitive.List,
|
204
273
|
{
|
205
274
|
ref,
|
206
275
|
className: cn(
|
207
|
-
|
276
|
+
tabsListVariant({ variant, orientation }),
|
208
277
|
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
209
278
|
className
|
210
279
|
),
|
@@ -214,14 +283,12 @@ var TabsList = React3.forwardRef(({ className, ...props }, ref) => {
|
|
214
283
|
});
|
215
284
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
216
285
|
var TabsTrigger = React3.forwardRef(({ className, chipProps, ...props }, ref) => {
|
286
|
+
const { orientation, variant } = React3.useContext(TabsContext);
|
217
287
|
return /* @__PURE__ */ React3.createElement(
|
218
288
|
TabsPrimitive.Trigger,
|
219
289
|
{
|
220
290
|
ref,
|
221
|
-
className: cn(
|
222
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
223
|
-
className
|
224
|
-
),
|
291
|
+
className: cn(tabsTriggerVariant({ variant, orientation }), className),
|
225
292
|
...props
|
226
293
|
},
|
227
294
|
props.children,
|
@@ -29,31 +29,100 @@ import React2 from "react";
|
|
29
29
|
// elements/tabs/Tabs.tsx
|
30
30
|
import * as React from "react";
|
31
31
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
32
|
-
|
33
|
-
var
|
34
|
-
|
35
|
-
|
32
|
+
import { tv } from "tailwind-variants";
|
33
|
+
var tabsListVariant = tv({
|
34
|
+
base: "",
|
35
|
+
variants: {
|
36
|
+
variant: {
|
37
|
+
default: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
38
|
+
underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
39
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
40
|
+
},
|
41
|
+
orientation: {
|
42
|
+
horizontal: "",
|
43
|
+
vertical: ""
|
44
|
+
}
|
45
|
+
},
|
46
|
+
compoundVariants: [
|
36
47
|
{
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
48
|
+
variant: "underlined_tabs",
|
49
|
+
orientation: "vertical",
|
50
|
+
class: "hawa-border-e-2 hawa-border-e-primary"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
variant: "underlined_tabs",
|
54
|
+
orientation: "horizontal",
|
55
|
+
class: "hawa-border-b-2 hawa-border-b-primary"
|
56
|
+
}
|
57
|
+
],
|
58
|
+
defaultVariants: {
|
59
|
+
variant: "default",
|
60
|
+
orientation: "horizontal"
|
61
|
+
}
|
62
|
+
});
|
63
|
+
var tabsTriggerVariant = tv({
|
64
|
+
base: "",
|
65
|
+
variants: {
|
66
|
+
variant: {
|
67
|
+
default: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
68
|
+
underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
69
|
+
underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
|
70
|
+
},
|
71
|
+
orientation: {
|
72
|
+
horizontal: "",
|
73
|
+
vertical: ""
|
74
|
+
}
|
75
|
+
},
|
76
|
+
compoundVariants: [
|
77
|
+
{
|
78
|
+
variant: "underlined",
|
79
|
+
orientation: "horizontal",
|
80
|
+
class: "data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
variant: "underlined",
|
84
|
+
orientation: "vertical",
|
85
|
+
class: "data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2"
|
44
86
|
},
|
45
|
-
|
46
|
-
|
47
|
-
|
87
|
+
{
|
88
|
+
variant: "underlined_tabs",
|
89
|
+
orientation: "horizontal",
|
90
|
+
class: "hawa-rounded-b-none"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
variant: "underlined_tabs",
|
94
|
+
orientation: "vertical",
|
95
|
+
class: "hawa-rounded-e-none"
|
96
|
+
}
|
97
|
+
],
|
98
|
+
defaultVariants: {
|
99
|
+
variant: "default",
|
100
|
+
orientation: "horizontal"
|
101
|
+
}
|
102
|
+
});
|
103
|
+
var TabsContext = React.createContext({ orientation: "horizontal", variant: "default" });
|
104
|
+
var Tabs = React.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
105
|
+
TabsPrimitive.Root,
|
106
|
+
{
|
107
|
+
ref,
|
108
|
+
className: cn(
|
109
|
+
"hawa-flex hawa-gap-2",
|
110
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
111
|
+
className
|
112
|
+
),
|
113
|
+
...props
|
114
|
+
},
|
115
|
+
/* @__PURE__ */ React.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
116
|
+
));
|
48
117
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
49
118
|
var TabsList = React.forwardRef(({ className, ...props }, ref) => {
|
50
|
-
const { orientation } = React.useContext(TabsContext);
|
119
|
+
const { orientation, variant } = React.useContext(TabsContext);
|
51
120
|
return /* @__PURE__ */ React.createElement(
|
52
121
|
TabsPrimitive.List,
|
53
122
|
{
|
54
123
|
ref,
|
55
124
|
className: cn(
|
56
|
-
|
125
|
+
tabsListVariant({ variant, orientation }),
|
57
126
|
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
58
127
|
className
|
59
128
|
),
|
@@ -63,14 +132,12 @@ var TabsList = React.forwardRef(({ className, ...props }, ref) => {
|
|
63
132
|
});
|
64
133
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
65
134
|
var TabsTrigger = React.forwardRef(({ className, chipProps, ...props }, ref) => {
|
135
|
+
const { orientation, variant } = React.useContext(TabsContext);
|
66
136
|
return /* @__PURE__ */ React.createElement(
|
67
137
|
TabsPrimitive.Trigger,
|
68
138
|
{
|
69
139
|
ref,
|
70
|
-
className: cn(
|
71
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
72
|
-
className
|
73
|
-
),
|
140
|
+
className: cn(tabsTriggerVariant({ variant, orientation }), className),
|
74
141
|
...props
|
75
142
|
},
|
76
143
|
props.children,
|
@@ -2804,31 +2804,100 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2804
2804
|
// elements/tabs/Tabs.tsx
|
2805
2805
|
import * as React13 from "react";
|
2806
2806
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
2807
|
-
|
2808
|
-
var
|
2809
|
-
|
2810
|
-
|
2807
|
+
import { tv } from "tailwind-variants";
|
2808
|
+
var tabsListVariant = tv({
|
2809
|
+
base: "",
|
2810
|
+
variants: {
|
2811
|
+
variant: {
|
2812
|
+
default: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
2813
|
+
underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
2814
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
2815
|
+
},
|
2816
|
+
orientation: {
|
2817
|
+
horizontal: "",
|
2818
|
+
vertical: ""
|
2819
|
+
}
|
2820
|
+
},
|
2821
|
+
compoundVariants: [
|
2811
2822
|
{
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
2816
|
-
className
|
2817
|
-
),
|
2818
|
-
...props
|
2823
|
+
variant: "underlined_tabs",
|
2824
|
+
orientation: "vertical",
|
2825
|
+
class: "hawa-border-e-2 hawa-border-e-primary"
|
2819
2826
|
},
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2827
|
+
{
|
2828
|
+
variant: "underlined_tabs",
|
2829
|
+
orientation: "horizontal",
|
2830
|
+
class: "hawa-border-b-2 hawa-border-b-primary"
|
2831
|
+
}
|
2832
|
+
],
|
2833
|
+
defaultVariants: {
|
2834
|
+
variant: "default",
|
2835
|
+
orientation: "horizontal"
|
2836
|
+
}
|
2837
|
+
});
|
2838
|
+
var tabsTriggerVariant = tv({
|
2839
|
+
base: "",
|
2840
|
+
variants: {
|
2841
|
+
variant: {
|
2842
|
+
default: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
2843
|
+
underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
2844
|
+
underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
|
2845
|
+
},
|
2846
|
+
orientation: {
|
2847
|
+
horizontal: "",
|
2848
|
+
vertical: ""
|
2849
|
+
}
|
2850
|
+
},
|
2851
|
+
compoundVariants: [
|
2852
|
+
{
|
2853
|
+
variant: "underlined",
|
2854
|
+
orientation: "horizontal",
|
2855
|
+
class: "data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2"
|
2856
|
+
},
|
2857
|
+
{
|
2858
|
+
variant: "underlined",
|
2859
|
+
orientation: "vertical",
|
2860
|
+
class: "data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2"
|
2861
|
+
},
|
2862
|
+
{
|
2863
|
+
variant: "underlined_tabs",
|
2864
|
+
orientation: "horizontal",
|
2865
|
+
class: "hawa-rounded-b-none"
|
2866
|
+
},
|
2867
|
+
{
|
2868
|
+
variant: "underlined_tabs",
|
2869
|
+
orientation: "vertical",
|
2870
|
+
class: "hawa-rounded-e-none"
|
2871
|
+
}
|
2872
|
+
],
|
2873
|
+
defaultVariants: {
|
2874
|
+
variant: "default",
|
2875
|
+
orientation: "horizontal"
|
2876
|
+
}
|
2877
|
+
});
|
2878
|
+
var TabsContext = React13.createContext({ orientation: "horizontal", variant: "default" });
|
2879
|
+
var Tabs = React13.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
2880
|
+
TabsPrimitive.Root,
|
2881
|
+
{
|
2882
|
+
ref,
|
2883
|
+
className: cn(
|
2884
|
+
"hawa-flex hawa-gap-2",
|
2885
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
2886
|
+
className
|
2887
|
+
),
|
2888
|
+
...props
|
2889
|
+
},
|
2890
|
+
/* @__PURE__ */ React13.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
2891
|
+
));
|
2823
2892
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
2824
2893
|
var TabsList = React13.forwardRef(({ className, ...props }, ref) => {
|
2825
|
-
const { orientation } = React13.useContext(TabsContext);
|
2894
|
+
const { orientation, variant } = React13.useContext(TabsContext);
|
2826
2895
|
return /* @__PURE__ */ React13.createElement(
|
2827
2896
|
TabsPrimitive.List,
|
2828
2897
|
{
|
2829
2898
|
ref,
|
2830
2899
|
className: cn(
|
2831
|
-
|
2900
|
+
tabsListVariant({ variant, orientation }),
|
2832
2901
|
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
2833
2902
|
className
|
2834
2903
|
),
|
@@ -2838,14 +2907,12 @@ var TabsList = React13.forwardRef(({ className, ...props }, ref) => {
|
|
2838
2907
|
});
|
2839
2908
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
2840
2909
|
var TabsTrigger = React13.forwardRef(({ className, chipProps, ...props }, ref) => {
|
2910
|
+
const { orientation, variant } = React13.useContext(TabsContext);
|
2841
2911
|
return /* @__PURE__ */ React13.createElement(
|
2842
2912
|
TabsPrimitive.Trigger,
|
2843
2913
|
{
|
2844
2914
|
ref,
|
2845
|
-
className: cn(
|
2846
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
2847
|
-
className
|
2848
|
-
),
|
2915
|
+
className: cn(tabsTriggerVariant({ variant, orientation }), className),
|
2849
2916
|
...props
|
2850
2917
|
},
|
2851
2918
|
props.children,
|
@@ -454,8 +454,9 @@ type SortButtonProps = {
|
|
454
454
|
};
|
455
455
|
declare const SortButton: React__default.FC<SortButtonProps>;
|
456
456
|
|
457
|
+
type TabsVariants = "default" | "underlined" | "underlined_tabs";
|
457
458
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
458
|
-
|
459
|
+
variant?: TabsVariants | undefined;
|
459
460
|
} & React.RefAttributes<HTMLDivElement>>;
|
460
461
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
461
462
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
package/dist/elements/index.d.ts
CHANGED
@@ -454,8 +454,9 @@ type SortButtonProps = {
|
|
454
454
|
};
|
455
455
|
declare const SortButton: React__default.FC<SortButtonProps>;
|
456
456
|
|
457
|
+
type TabsVariants = "default" | "underlined" | "underlined_tabs";
|
457
458
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
458
|
-
|
459
|
+
variant?: TabsVariants | undefined;
|
459
460
|
} & React.RefAttributes<HTMLDivElement>>;
|
460
461
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
461
462
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|