@exem-ui/react 0.3.4-next.20260609002221 → 0.3.4-next.20260609061639

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.mjs CHANGED
@@ -1,12 +1,11 @@
1
- import { ConditionalTooltip, overlayListVariants, commonInputVariants } from './chunk-JXUDLY4B.mjs';
2
- export { Segment, Select, Tooltip } from './chunk-JXUDLY4B.mjs';
1
+ import { ConditionalTooltip, overlayListVariants, commonInputVariants } from './chunk-CJHMZRUO.mjs';
2
+ export { Segment, Select, Tabs, Tooltip } from './chunk-CJHMZRUO.mjs';
3
3
  import { X, MoreHorizontal, iconSizes, Minus, Check, Person, Warning, Info, Error as Error$1, ChevronLeft, ChevronRight } from './chunk-HV6LIYRO.mjs';
4
4
  import { cva, cn } from '@exem-ui/core/utils';
5
5
  import * as React from 'react';
6
- import { forwardRef, Fragment, createContext, cloneElement, useId, useContext, useState } from 'react';
6
+ import { forwardRef, Fragment, cloneElement, useId, createContext, useContext, useState } from 'react';
7
7
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
8
8
  import { Slot } from '@radix-ui/react-slot';
9
- import * as TabsPrimitive from '@radix-ui/react-tabs';
10
9
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
11
10
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
12
11
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -400,91 +399,6 @@ Breadcrumb.Page.displayName = "Breadcrumb.Page";
400
399
  Breadcrumb.Path.displayName = "Breadcrumb.Path";
401
400
  Breadcrumb.Separator.displayName = "Breadcrumb.Separator";
402
401
  Breadcrumb.Ellipsis.displayName = "Breadcrumb.Ellipsis";
403
- var TabsContext = createContext({ type: "primary" });
404
- var useTabsContext = () => {
405
- const context = useContext(TabsContext);
406
- if (!context) {
407
- throw new Error("useTabsContext must be used within a TabsProvider");
408
- }
409
- return context;
410
- };
411
- var tabsListVariants = cva("inline-flex items-center", {
412
- variants: {
413
- type: {
414
- primary: "h-9 gap-5 border-b border-border-primary",
415
- secondary: "h-8 gap-1"
416
- }
417
- },
418
- defaultVariants: {
419
- type: "primary"
420
- }
421
- });
422
- var tabsTriggerVariants = cva(
423
- "group inline-flex items-center justify-center gap-1.5 whitespace-nowrap font-pretendard font-semibold text-body-2 leading-[140%] transition-all disabled:pointer-events-none disabled:opacity-50",
424
- {
425
- variants: {
426
- type: {
427
- primary: [
428
- "h-9 border-b-2 border-transparent p-0 text-text-tertiary",
429
- "hover:text-text-primary",
430
- "data-[state=active]:border-border-focused data-[state=active]:text-text-primary"
431
- ],
432
- secondary: [
433
- "h-8 rounded-strong px-2 text-text-tertiary",
434
- "hover:text-text-primary",
435
- "data-[state=active]:rounded-medium data-[state=active]:bg-elevation-elevation-2 data-[state=active]:text-text-primary"
436
- ]
437
- }
438
- },
439
- defaultVariants: {
440
- type: "primary"
441
- }
442
- }
443
- );
444
- var Tabs = forwardRef(
445
- ({ type = "primary", children, ...props }, ref) => /* @__PURE__ */ jsx(TabsContext.Provider, { value: { type }, children: /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, ...props, children }) })
446
- );
447
- Tabs.List = forwardRef(
448
- ({ className, ...props }, ref) => {
449
- const { type } = useTabsContext();
450
- return /* @__PURE__ */ jsx(
451
- TabsPrimitive.List,
452
- {
453
- ref,
454
- className: cn(tabsListVariants({ type }), className),
455
- ...props
456
- }
457
- );
458
- }
459
- );
460
- Tabs.Trigger = forwardRef(
461
- ({ className, leftIcon, rightIcon, badge, children, ...props }, ref) => {
462
- const { type } = useTabsContext();
463
- return /* @__PURE__ */ jsxs(
464
- TabsPrimitive.Trigger,
465
- {
466
- ref,
467
- className: cn(tabsTriggerVariants({ type }), className),
468
- ...props,
469
- children: [
470
- leftIcon && /* @__PURE__ */ jsx("span", { className: "size-4", children: leftIcon }),
471
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
472
- children,
473
- badge && /* @__PURE__ */ jsx("span", { className: "text-text-tertiary group-data-[state=active]:text-text-accent", children: badge })
474
- ] }),
475
- rightIcon && /* @__PURE__ */ jsx("span", { className: "size-4", children: rightIcon })
476
- ]
477
- }
478
- );
479
- }
480
- );
481
- Tabs.Content = forwardRef(
482
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn(className), ...props })
483
- );
484
- Tabs.displayName = "Tabs";
485
- Tabs.List.displayName = "Tabs.List";
486
- Tabs.Trigger.displayName = "Tabs.Trigger";
487
- Tabs.Content.displayName = "Tabs.Content";
488
402
  var colorStyles = {
489
403
  accent: {
490
404
  contained: {
@@ -2524,6 +2438,6 @@ var buttonize = (fn) => {
2524
2438
  };
2525
2439
  };
2526
2440
 
2527
- export { Avatar, Badge, Breadcrumb, Button, ButtonGroup, Checkbox, DatePicker, DoubleTag, Dropdown, IconButton, Loading, MessageBox, Modal, Progress, Radio, ScrollArea, ScrollBar, Star, Switch, Tabs, Tag, TextArea, TextField, ToastProvider, Toaster, buttonize, toast, useToast };
2441
+ export { Avatar, Badge, Breadcrumb, Button, ButtonGroup, Checkbox, DatePicker, DoubleTag, Dropdown, IconButton, Loading, MessageBox, Modal, Progress, Radio, ScrollArea, ScrollBar, Star, Switch, Tag, TextArea, TextField, ToastProvider, Toaster, buttonize, toast, useToast };
2528
2442
  //# sourceMappingURL=index.mjs.map
2529
2443
  //# sourceMappingURL=index.mjs.map