@exem-ui/react 0.3.2 → 0.3.3

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.js CHANGED
@@ -1,13 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ var chunkCMKUMLDS_js = require('./chunk-CMKUMLDS.js');
3
4
  var chunk5M47B2XJ_js = require('./chunk-5M47B2XJ.js');
4
5
  var utils = require('@exem-ui/core/utils');
5
- var React2 = require('react');
6
+ var React = require('react');
6
7
  var jsxRuntime = require('react/jsx-runtime');
7
8
  var reactSlot = require('@radix-ui/react-slot');
8
9
  var TabsPrimitive = require('@radix-ui/react-tabs');
9
- var SelectPrimitive = require('@radix-ui/react-select');
10
- var TooltipPrimitive = require('@radix-ui/react-tooltip');
11
10
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
12
11
  var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
13
12
  var SwitchPrimitives = require('@radix-ui/react-switch');
@@ -34,10 +33,8 @@ function _interopNamespace(e) {
34
33
  return Object.freeze(n);
35
34
  }
36
35
 
37
- var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
36
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
38
37
  var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
39
- var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
40
- var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
41
38
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
42
39
  var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
43
40
  var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
@@ -111,7 +108,7 @@ var renderIconContent = (size = "medium") => {
111
108
  const iconSize = SIZE_CONFIG[size].iconSize;
112
109
  return /* @__PURE__ */ jsxRuntime.jsx(chunk5M47B2XJ_js.Person, { className: utils.cn("shrink-0", iconSize) });
113
110
  };
114
- var Avatar = React2.forwardRef(
111
+ var Avatar = React.forwardRef(
115
112
  ({ className, size = "medium", type = "initial", name, src, alt, ...props }, ref) => {
116
113
  const resolvedSize = size || "medium";
117
114
  const isFallback = type === "image" && !src;
@@ -153,7 +150,7 @@ var badgeVariants = utils.cva(
153
150
  }
154
151
  }
155
152
  );
156
- var Badge = React2.forwardRef(
153
+ var Badge = React.forwardRef(
157
154
  ({ className, variant = "default", disabled = false, ...props }, ref) => {
158
155
  const finalVariant = disabled ? `${variant}-disabled` : variant;
159
156
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -207,7 +204,7 @@ var StarRoundedFilled = (props) => /* @__PURE__ */ jsxRuntime.jsx(
207
204
  )
208
205
  }
209
206
  );
210
- var Star = React2.forwardRef(
207
+ var Star = React.forwardRef(
211
208
  ({ size = "medium", selected = false, className, onClick, ...props }, ref) => {
212
209
  const sizeConfig = {
213
210
  small: { width: 16, height: 16 },
@@ -294,7 +291,7 @@ var tagVariants = utils.cva(
294
291
  }
295
292
  }
296
293
  );
297
- var Tag = React2.forwardRef(
294
+ var Tag = React.forwardRef(
298
295
  ({
299
296
  className,
300
297
  color,
@@ -334,7 +331,7 @@ var Tag = React2.forwardRef(
334
331
  }
335
332
  );
336
333
  Tag.displayName = "Tag";
337
- var DoubleTag = React2.forwardRef(
334
+ var DoubleTag = React.forwardRef(
338
335
  ({ className, items, ...props }, ref) => {
339
336
  return /* @__PURE__ */ jsxRuntime.jsx(
340
337
  "div",
@@ -345,7 +342,7 @@ var DoubleTag = React2.forwardRef(
345
342
  ),
346
343
  ref,
347
344
  ...props,
348
- children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React2.Fragment, { children: [
345
+ children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
349
346
  /* @__PURE__ */ jsxRuntime.jsx(Tag, { color: item.color, type: "line", className: "rounded-none border-none", children: item.content }),
350
347
  index < items.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[20px] w-px border-none bg-border-secondary" })
351
348
  ] }, index))
@@ -354,8 +351,8 @@ var DoubleTag = React2.forwardRef(
354
351
  }
355
352
  );
356
353
  DoubleTag.displayName = "DoubleTag";
357
- var Breadcrumb = React2.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
358
- Breadcrumb.List = React2.forwardRef(
354
+ var Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
355
+ Breadcrumb.List = React.forwardRef(
359
356
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
360
357
  "ol",
361
358
  {
@@ -368,14 +365,14 @@ Breadcrumb.List = React2.forwardRef(
368
365
  }
369
366
  )
370
367
  );
371
- Breadcrumb.Item = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: utils.cn("inline-flex items-center", className), ...props }));
372
- Breadcrumb.Link = React2.forwardRef(
368
+ Breadcrumb.Item = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: utils.cn("inline-flex items-center", className), ...props }));
369
+ Breadcrumb.Link = React.forwardRef(
373
370
  ({ asChild, className, ...props }, ref) => {
374
371
  const Comp = asChild ? reactSlot.Slot : "a";
375
372
  return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ref, className: utils.cn("text-text-link", className), ...props });
376
373
  }
377
374
  );
378
- Breadcrumb.Page = React2.forwardRef(
375
+ Breadcrumb.Page = React.forwardRef(
379
376
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
380
377
  "span",
381
378
  {
@@ -388,7 +385,7 @@ Breadcrumb.Page = React2.forwardRef(
388
385
  }
389
386
  )
390
387
  );
391
- Breadcrumb.Separator = React2.forwardRef(
388
+ Breadcrumb.Separator = React.forwardRef(
392
389
  ({ children, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
393
390
  "li",
394
391
  {
@@ -401,7 +398,7 @@ Breadcrumb.Separator = React2.forwardRef(
401
398
  }
402
399
  )
403
400
  );
404
- Breadcrumb.Ellipsis = React2.forwardRef(
401
+ Breadcrumb.Ellipsis = React.forwardRef(
405
402
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
406
403
  "span",
407
404
  {
@@ -424,9 +421,9 @@ Breadcrumb.Link.displayName = "Breadcrumb.Link";
424
421
  Breadcrumb.Page.displayName = "Breadcrumb.Page";
425
422
  Breadcrumb.Separator.displayName = "Breadcrumb.Separator";
426
423
  Breadcrumb.Ellipsis.displayName = "Breadcrumb.Ellipsis";
427
- var TabsContext = React2.createContext({ type: "primary" });
424
+ var TabsContext = React.createContext({ type: "primary" });
428
425
  var useTabsContext = () => {
429
- const context = React2.useContext(TabsContext);
426
+ const context = React.useContext(TabsContext);
430
427
  if (!context) {
431
428
  throw new Error("useTabsContext must be used within a TabsProvider");
432
429
  }
@@ -465,10 +462,10 @@ var tabsTriggerVariants = utils.cva(
465
462
  }
466
463
  }
467
464
  );
468
- var Tabs = React2.forwardRef(
465
+ var Tabs = React.forwardRef(
469
466
  ({ type = "primary", children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { type }, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, ...props, children }) })
470
467
  );
471
- Tabs.List = React2.forwardRef(
468
+ Tabs.List = React.forwardRef(
472
469
  ({ className, ...props }, ref) => {
473
470
  const { type } = useTabsContext();
474
471
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -481,7 +478,7 @@ Tabs.List = React2.forwardRef(
481
478
  );
482
479
  }
483
480
  );
484
- Tabs.Trigger = React2.forwardRef(
481
+ Tabs.Trigger = React.forwardRef(
485
482
  ({ className, leftIcon, rightIcon, badge, children, ...props }, ref) => {
486
483
  const { type } = useTabsContext();
487
484
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -502,7 +499,7 @@ Tabs.Trigger = React2.forwardRef(
502
499
  );
503
500
  }
504
501
  );
505
- Tabs.Content = React2.forwardRef(
502
+ Tabs.Content = React.forwardRef(
506
503
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Content, { ref, className: utils.cn(className), ...props })
507
504
  );
508
505
  Tabs.displayName = "Tabs";
@@ -676,7 +673,7 @@ var IconSize = {
676
673
  large: "h-5 w-5",
677
674
  xlarge: "h-6 w-6"
678
675
  };
679
- var Button = React2.forwardRef(
676
+ var Button = React.forwardRef(
680
677
  ({
681
678
  className,
682
679
  variant = "contained",
@@ -688,7 +685,7 @@ var Button = React2.forwardRef(
688
685
  }, ref) => {
689
686
  const validColorStyle = color === "assistive" || color === "inverse" ? colorStyles[color].contained : colorStyles[color][variant];
690
687
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
691
- icon && React2.cloneElement(icon, {
688
+ icon && React.cloneElement(icon, {
692
689
  className: utils.cn(
693
690
  "shrink-0 [&>path]:fill-current",
694
691
  validColorStyle.icon,
@@ -724,609 +721,6 @@ var Button = React2.forwardRef(
724
721
  }
725
722
  );
726
723
  Button.displayName = "Button";
727
- var segmentListVariants = utils.cva(
728
- "inline-flex items-center overflow-hidden rounded-medium bg-elevation-elevation-2",
729
- {
730
- variants: {
731
- size: {
732
- small: "h-7 gap-0 p-0.5",
733
- medium: "h-8 gap-0 p-0.5",
734
- large: "h-10 gap-0 p-0.5"
735
- }
736
- },
737
- defaultVariants: {
738
- size: "medium"
739
- }
740
- }
741
- );
742
- var segmentItemVariants = utils.cva(
743
- [
744
- "flex flex-1 items-center justify-center rounded-weak",
745
- "focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring",
746
- "disabled:cursor-not-allowed",
747
- "data-[state=active]:bg-component-segmentedOption data-[state=active]:text-text-primary data-[state=active]:shadow-weak",
748
- "data-[state=inactive]:text-text-tertiary data-[state=inactive]:disabled:text-text-disabled",
749
- "transition-colors duration-200 ease-in-out"
750
- ],
751
- {
752
- variants: {
753
- size: {
754
- small: "h-6 gap-0.5 text-body-3 font-medium",
755
- medium: "h-7 gap-1 text-body-2 font-medium",
756
- large: "h-9 gap-1.5 text-body-2 font-medium"
757
- }
758
- },
759
- defaultVariants: {
760
- size: "medium"
761
- }
762
- }
763
- );
764
- var segmentIconVariants = utils.cva("flex items-center justify-center", {
765
- variants: {
766
- size: {
767
- small: "size-4",
768
- medium: "size-4",
769
- large: "size-5"
770
- }
771
- },
772
- defaultVariants: {
773
- size: "medium"
774
- }
775
- });
776
- var SegmentContext = React2.createContext(void 0);
777
- var useSegmentContext = () => {
778
- const context = React2.useContext(SegmentContext);
779
- if (!context) {
780
- throw new Error("Segment components must be used within a Segment");
781
- }
782
- return context;
783
- };
784
- var Segment = React2.forwardRef(
785
- ({ size = "medium", children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SegmentContext.Provider, { value: { size }, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, ...props, children }) })
786
- );
787
- Segment.List = React2.forwardRef(
788
- ({ className, ...props }, ref) => {
789
- const { size } = useSegmentContext();
790
- return /* @__PURE__ */ jsxRuntime.jsx(
791
- TabsPrimitive__namespace.List,
792
- {
793
- ref,
794
- className: utils.cn(segmentListVariants({ size }), className),
795
- ...props
796
- }
797
- );
798
- }
799
- );
800
- Segment.Item = React2.forwardRef(
801
- ({ className, leftIcon, children, ...props }, ref) => {
802
- const { size } = useSegmentContext();
803
- return /* @__PURE__ */ jsxRuntime.jsxs(
804
- TabsPrimitive__namespace.Trigger,
805
- {
806
- ref,
807
- className: utils.cn(segmentItemVariants({ size }), className),
808
- ...props,
809
- children: [
810
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: utils.cn(segmentIconVariants({ size })), children: leftIcon }),
811
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center", children })
812
- ]
813
- }
814
- );
815
- }
816
- );
817
- Segment.Content = React2.forwardRef(
818
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
819
- TabsPrimitive__namespace.Content,
820
- {
821
- ref,
822
- className: utils.cn(
823
- "ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
824
- className
825
- ),
826
- ...props
827
- }
828
- )
829
- );
830
- Segment.displayName = "Segment";
831
- Segment.List.displayName = "Segment.List";
832
- Segment.Content.displayName = "Segment.Content";
833
- Segment.Item.displayName = "Segment.Item";
834
- var commonInputVariants = {
835
- // Container variants - 전체 컴포넌트 래퍼
836
- container: utils.cva("flex flex-col"),
837
- // Label variants - 라벨 텍스트
838
- label: utils.cva("inline-block font-regular text-text-primary", {
839
- variants: {
840
- size: {
841
- xsmall: "mb-[2px] text-body-3",
842
- small: "mb-[4px] text-body-2",
843
- medium: "mb-[4px] text-body-2",
844
- large: "mb-[6px] text-body-1"
845
- },
846
- disabled: {
847
- true: "text-text-disabled"
848
- },
849
- required: {
850
- true: 'after:ml-0.5 after:text-text-critical after:content-["*"]'
851
- }
852
- },
853
- compoundVariants: [
854
- {
855
- required: true,
856
- disabled: true,
857
- className: "after:text-text-disabled"
858
- }
859
- ],
860
- defaultVariants: { size: "medium" }
861
- }),
862
- // Description variants - 설명 텍스트
863
- description: utils.cva("mt-0.5 inline-block text-text-tertiary", {
864
- variants: {
865
- size: {
866
- xsmall: "text-caption",
867
- small: "text-body-3",
868
- medium: "text-body-3",
869
- large: "text-body-2"
870
- },
871
- error: {
872
- true: "text-text-critical"
873
- },
874
- disabled: {
875
- true: "text-text-disabled"
876
- }
877
- },
878
- compoundVariants: [
879
- {
880
- error: true,
881
- disabled: true,
882
- className: "text-text-disabled"
883
- // disabled 우선 적용
884
- }
885
- ],
886
- defaultVariants: { size: "medium" }
887
- }),
888
- // Icon variants - 아이콘 크기
889
- icon: utils.cva("shrink-0", {
890
- variants: {
891
- size: {
892
- xsmall: "size-4",
893
- small: "size-4",
894
- medium: "size-4",
895
- large: "size-5"
896
- }
897
- },
898
- defaultVariants: { size: "medium" }
899
- })
900
- };
901
-
902
- // src/input/selectVariants.ts
903
- var selectVariants = {
904
- container: commonInputVariants.container,
905
- content: utils.cn(
906
- "relative border border-border-primary z-50 min-w-[8rem] overflow-hidden rounded-medium bg-background-overlay shadow-weak",
907
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
908
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1"
909
- ),
910
- description: commonInputVariants.description,
911
- iconSize: commonInputVariants.icon,
912
- item: utils.cva(
913
- "relative flex w-full cursor-pointer select-none items-center rounded-weak px-2 text-body-2 text-text-primary outline-none hover:bg-elevation-elevation-2 data-[disabled]:pointer-events-none data-[state=checked]:bg-elevation-accent data-[disabled]:text-text-disabled",
914
- {
915
- defaultVariants: { size: "medium" },
916
- variants: {
917
- size: {
918
- xsmall: "h-6",
919
- small: "h-7",
920
- medium: "h-8",
921
- large: "h-10"
922
- }
923
- }
924
- }
925
- ),
926
- itemText: utils.cva("truncate flex items-center flex-1 min-w-0", {
927
- defaultVariants: { size: "medium" },
928
- variants: {
929
- size: {
930
- xsmall: "h-6",
931
- small: "h-7",
932
- medium: "h-8",
933
- large: "h-10"
934
- }
935
- }
936
- }),
937
- label: commonInputVariants.label,
938
- trigger: utils.cva(
939
- "group flex w-full items-center justify-between rounded-medium outline-none disabled:cursor-not-allowed disabled:bg-elevation-elevation-2 disabled:text-text-disabled data-[state=open]:border data-[state=open]:border-border-focused [&>span]:line-clamp-1 [&[data-placeholder]]:text-text-tertiary [&_svg]:text-icon-primary",
940
- {
941
- compoundVariants: [
942
- {
943
- className: "border-border-accent text-tint-foreground-sky bg-elevation-accent [&[data-placeholder]]:text-tint-foreground-sky [&_svg]:text-tint-foreground-sky",
944
- focus: true,
945
- variant: "line"
946
- },
947
- // active + fill: 배경만 accent로 변경
948
- {
949
- className: "bg-elevation-accent text-tint-foreground-sky [&[data-placeholder]]:text-tint-foreground-sky [&_svg]:text-tint-foreground-sky",
950
- active: true,
951
- variant: "fill"
952
- },
953
- // active + line: 배경 accent + 테두리 accent
954
- {
955
- className: "bg-elevation-accent border-border-accent text-tint-foreground-sky [&[data-placeholder]]:text-tint-foreground-sky [&_svg]:text-tint-foreground-sky",
956
- active: true,
957
- variant: "line"
958
- }
959
- ],
960
- defaultVariants: {
961
- active: false,
962
- error: false,
963
- focus: false,
964
- size: "medium",
965
- variant: "fill"
966
- },
967
- variants: {
968
- active: {
969
- false: "",
970
- true: ""
971
- },
972
- error: {
973
- false: "",
974
- true: "border !border-border-critical"
975
- },
976
- focus: {
977
- false: "",
978
- // 현재는 line 타입만 focus 가능
979
- true: ""
980
- },
981
- size: {
982
- xsmall: "h-6 px-[4px] text-body-3",
983
- small: "h-7 px-[6px] text-body-2",
984
- medium: "h-8 px-[8px] text-body-2",
985
- large: "h-10 px-[10px] text-body-1"
986
- },
987
- variant: {
988
- fill: "bg-elevation-elevation-2",
989
- line: "border-border-primary border"
990
- }
991
- }
992
- }
993
- ),
994
- triggerInner: utils.cva("flex w-full items-center", {
995
- defaultVariants: { size: "medium" },
996
- variants: {
997
- size: {
998
- xsmall: "gap-0",
999
- small: "gap-[2px]",
1000
- medium: "gap-[2px]",
1001
- large: "gap-[4px]"
1002
- }
1003
- }
1004
- }),
1005
- viewport: utils.cn("flex flex-col gap-0.5 p-1")
1006
- };
1007
- var SelectContext = React2.createContext(null);
1008
- var useSelectContext = () => {
1009
- const context = React2.useContext(SelectContext);
1010
- if (!context) {
1011
- throw new Error("Select components must be used within a Select");
1012
- }
1013
- return context;
1014
- };
1015
- var SelectGroupContext = React2.createContext(null);
1016
- var useSelectGroupContext = () => {
1017
- return React2.useContext(SelectGroupContext);
1018
- };
1019
- var Select = React2.forwardRef(
1020
- ({
1021
- children,
1022
- size = "medium",
1023
- variant = "fill",
1024
- error = false,
1025
- disabled = false,
1026
- focus = false,
1027
- active = false,
1028
- className,
1029
- ...selectProps
1030
- }, ref) => {
1031
- const uniqueId = React2.useId();
1032
- const id = `select-${uniqueId}`;
1033
- return /* @__PURE__ */ jsxRuntime.jsx(SelectContext.Provider, { value: { active, disabled, error, focus, id, size, variant }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn(selectVariants.container(), className), children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Root, { disabled, ...selectProps, children }) }) });
1034
- }
1035
- );
1036
- Select.Value = React2.forwardRef(({ className, children, ...props }, ref) => {
1037
- return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { ref, className, ...props, children });
1038
- });
1039
- Select.Trigger = React2.forwardRef(
1040
- ({ className, children, leftIcon, ...props }, ref) => {
1041
- const { size, error, id, variant, focus, active } = useSelectContext();
1042
- const groupContext = useSelectGroupContext();
1043
- const groupClasses = groupContext ? utils.cn("rounded-none border-0", {
1044
- "rounded-l-medium": groupContext.isFirstChild,
1045
- "rounded-r-medium": groupContext.isLastChild,
1046
- // line variant: group이 외곽 border를 제공하므로, open 시 border 대신 inset ring 사용
1047
- "data-[state=open]:border-0 data-[state=open]:ring-1 data-[state=open]:ring-inset data-[state=open]:ring-border-focused": variant === "line"
1048
- }) : void 0;
1049
- return /* @__PURE__ */ jsxRuntime.jsx(
1050
- SelectPrimitive__namespace.Trigger,
1051
- {
1052
- ref,
1053
- id,
1054
- "data-slot": "select-trigger",
1055
- className: utils.cn(
1056
- selectVariants.trigger({ active, error, focus, size, variant }),
1057
- groupClasses,
1058
- className
1059
- ),
1060
- ...props,
1061
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils.cn(selectVariants.triggerInner({ size })), children: [
1062
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
1063
- "span",
1064
- {
1065
- className: utils.cn(
1066
- selectVariants.iconSize({ size }),
1067
- "flex items-center justify-center group-disabled:text-icon-disabled"
1068
- ),
1069
- children: leftIcon
1070
- }
1071
- ),
1072
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1 truncate text-left", children }),
1073
- /* @__PURE__ */ jsxRuntime.jsx(
1074
- chunk5M47B2XJ_js.ChevronDown,
1075
- {
1076
- type: "regular",
1077
- className: utils.cn(
1078
- selectVariants.iconSize({ size }),
1079
- "transition-transform duration-200 group-data-[state=open]:rotate-180",
1080
- "group-disabled:text-icon-disabled"
1081
- )
1082
- }
1083
- )
1084
- ] })
1085
- }
1086
- );
1087
- }
1088
- );
1089
- Select.Box = React2.forwardRef(
1090
- ({ placeholder, leftIcon, className, ...props }, ref) => {
1091
- return /* @__PURE__ */ jsxRuntime.jsx(Select.Trigger, { ref, leftIcon, className, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(Select.Value, { placeholder }) });
1092
- }
1093
- );
1094
- Select.List = React2.forwardRef(
1095
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1096
- SelectPrimitive__namespace.Content,
1097
- {
1098
- ref,
1099
- "data-slot": "select-content",
1100
- className: utils.cn(selectVariants.content, "max-h-60 ", className),
1101
- position: "popper",
1102
- ...props,
1103
- children: /* @__PURE__ */ jsxRuntime.jsx(
1104
- SelectPrimitive__namespace.Viewport,
1105
- {
1106
- "data-slot": "select-viewport",
1107
- className: utils.cn(
1108
- selectVariants.viewport,
1109
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
1110
- ),
1111
- children
1112
- }
1113
- )
1114
- }
1115
- ) })
1116
- );
1117
- Select.Label = React2.forwardRef(
1118
- ({ children, required = false, size: sizeProp, className }, ref) => {
1119
- const { size: contextSize, disabled, id } = useSelectContext();
1120
- const groupContext = useSelectGroupContext();
1121
- const size = sizeProp ?? groupContext?.size ?? contextSize;
1122
- return /* @__PURE__ */ jsxRuntime.jsx(
1123
- "label",
1124
- {
1125
- ref,
1126
- htmlFor: id,
1127
- className: utils.cn(selectVariants.label({ disabled, required, size }), className),
1128
- children
1129
- }
1130
- );
1131
- }
1132
- );
1133
- Select.Item = React2.forwardRef(
1134
- ({
1135
- className,
1136
- children,
1137
- leftIcon,
1138
- rightIcon,
1139
- leftIconSize,
1140
- rightIconSize,
1141
- size: sizeProp,
1142
- ...props
1143
- }, ref) => {
1144
- const { size: contextSize } = useSelectContext();
1145
- const groupContext = useSelectGroupContext();
1146
- const size = sizeProp ?? groupContext?.size ?? contextSize;
1147
- return /* @__PURE__ */ jsxRuntime.jsx(
1148
- SelectPrimitive__namespace.Item,
1149
- {
1150
- "data-slot": "select-item",
1151
- ref,
1152
- className: utils.cn(selectVariants.item({ size }), className),
1153
- ...props,
1154
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [
1155
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-0.5", children: [
1156
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
1157
- "span",
1158
- {
1159
- className: utils.cn(
1160
- selectVariants.iconSize({ size: leftIconSize ?? size }),
1161
- "flex items-center justify-center text-icon-primary"
1162
- ),
1163
- children: leftIcon
1164
- }
1165
- ),
1166
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn(selectVariants.itemText({ size })), children }) })
1167
- ] }),
1168
- rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
1169
- "span",
1170
- {
1171
- className: utils.cn(
1172
- selectVariants.iconSize({ size: rightIconSize ?? size }),
1173
- "flex items-center justify-center text-icon-primary"
1174
- ),
1175
- children: rightIcon
1176
- }
1177
- )
1178
- ] })
1179
- }
1180
- );
1181
- }
1182
- );
1183
- Select.Empty = React2.forwardRef(
1184
- ({ children = "No data", className }, ref) => {
1185
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn("flex min-h-8 items-center justify-center p-2", className), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-body-2 text-text-disabled", children }) });
1186
- }
1187
- );
1188
- Select.Description = React2.forwardRef(
1189
- ({ children, size: sizeProp, className }, ref) => {
1190
- const { size: contextSize, error, disabled } = useSelectContext();
1191
- const groupContext = useSelectGroupContext();
1192
- const size = sizeProp ?? groupContext?.size ?? contextSize;
1193
- if (!children) {
1194
- return null;
1195
- }
1196
- return /* @__PURE__ */ jsxRuntime.jsx(
1197
- "div",
1198
- {
1199
- ref,
1200
- "data-slot": "select-description",
1201
- className: utils.cn(selectVariants.description({ disabled, error, size }), className),
1202
- children: /* @__PURE__ */ jsxRuntime.jsx("p", { children })
1203
- }
1204
- );
1205
- }
1206
- );
1207
- Select.Group = React2.forwardRef(
1208
- ({ children, size = "medium", variant = "fill", hasBackground = false, className }, ref) => {
1209
- const childArray = React2__namespace.Children.toArray(children);
1210
- return /* @__PURE__ */ jsxRuntime.jsx(
1211
- "div",
1212
- {
1213
- ref,
1214
- className: utils.cn(
1215
- "flex w-fit flex-row items-stretch overflow-clip rounded-medium",
1216
- variant === "line" && "border border-border-primary",
1217
- hasBackground && "bg-elevation-elevation-0",
1218
- className
1219
- ),
1220
- children: childArray.map((child, index) => {
1221
- const isFirst = index === 0;
1222
- const isLast = index === childArray.length - 1;
1223
- return /* @__PURE__ */ jsxRuntime.jsxs(React2__namespace.Fragment, { children: [
1224
- /* @__PURE__ */ jsxRuntime.jsx(
1225
- SelectGroupContext.Provider,
1226
- {
1227
- value: { isFirstChild: isFirst, isLastChild: isLast, size, variant },
1228
- children: child
1229
- }
1230
- ),
1231
- !isLast && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px self-stretch bg-border-primary" })
1232
- ] }, index);
1233
- })
1234
- }
1235
- );
1236
- }
1237
- );
1238
- Select.displayName = "Select";
1239
- Select.Label.displayName = "Select.Label";
1240
- Select.Trigger.displayName = "Select.Trigger";
1241
- Select.Box.displayName = "Select.Box";
1242
- Select.Value.displayName = "Select.Value";
1243
- Select.List.displayName = "Select.List";
1244
- Select.Item.displayName = "Select.Item";
1245
- Select.Empty.displayName = "Select.Empty";
1246
- Select.Description.displayName = "Select.Description";
1247
- Select.Group.displayName = "Select.Group";
1248
- var tooltipContentVariants = utils.cva(
1249
- [
1250
- // Base layout
1251
- "z-50 flex flex-col items-start overflow-hidden",
1252
- "rounded-medium",
1253
- "text-text-static-light",
1254
- "bg-component-tooltip border border-border-primary",
1255
- "shadow-medium",
1256
- "animate-in fade-in-0 zoom-in-95",
1257
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
1258
- "data-[side=bottom]:slide-in-from-top-2",
1259
- "data-[side=left]:slide-in-from-right-2",
1260
- "data-[side=right]:slide-in-from-left-2",
1261
- "data-[side=top]:slide-in-from-bottom-2"
1262
- ],
1263
- {
1264
- variants: {
1265
- size: {
1266
- tiny: "px-2 py-1 text-body-3",
1267
- small: "w-[160px] gap-[8px] px-[12px] py-[10px]",
1268
- medium: "w-[240px] gap-[8px] px-[12px] py-[10px]",
1269
- large: "w-[320px] gap-[8px] px-[12px] py-[10px]",
1270
- xlarge: "w-[400px] gap-[8px] px-[12px] py-[10px]"
1271
- }
1272
- },
1273
- defaultVariants: { size: "small" }
1274
- }
1275
- );
1276
- var tooltipTitleVariants = utils.cva([
1277
- "text-body-1 font-semibold text-text-static-light",
1278
- "group-data-[size=tiny]/tooltip-content:text-body-3"
1279
- ]);
1280
- var tooltipTextVariants = utils.cva([
1281
- "text-body-2 font-regular text-text-static-light",
1282
- "group-data-[size=tiny]/tooltip-content:text-body-3"
1283
- ]);
1284
- var Tooltip = TooltipPrimitive__namespace.Root;
1285
- Tooltip.Provider = TooltipPrimitive__namespace.Provider;
1286
- Tooltip.Trigger = TooltipPrimitive__namespace.Trigger;
1287
- Tooltip.Content = React2.forwardRef(({ className, sideOffset = 4, size, children, portalContainer, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
1288
- TooltipPrimitive__namespace.Content,
1289
- {
1290
- ref,
1291
- sideOffset,
1292
- "data-size": size,
1293
- className: utils.cn("group/tooltip-content", tooltipContentVariants({ size }), className),
1294
- ...props,
1295
- children
1296
- }
1297
- ) }));
1298
- Tooltip.Title = React2.forwardRef(
1299
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn(tooltipTitleVariants(), className), ...props, children })
1300
- );
1301
- Tooltip.Description = React2.forwardRef(
1302
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn(tooltipTextVariants(), className), ...props, children })
1303
- );
1304
- Tooltip.displayName = "Tooltip";
1305
- Tooltip.Content.displayName = "Tooltip.Content";
1306
- Tooltip.Title.displayName = "Tooltip.Title";
1307
- Tooltip.Description.displayName = "Tooltip.Description";
1308
- Tooltip.Trigger.displayName = "Tooltip.Trigger";
1309
- Tooltip.Provider.displayName = "Tooltip.Provider";
1310
- var FlatTooltip = ({ children, title, size, description, ...props }) => {
1311
- return /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Provider, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
1312
- /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Trigger, { asChild: true, children }),
1313
- /* @__PURE__ */ jsxRuntime.jsxs(Tooltip.Content, { size, ...props, children: [
1314
- title && /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Title, { children: title }),
1315
- description && /* @__PURE__ */ jsxRuntime.jsx(Tooltip.Description, { children: description })
1316
- ] })
1317
- ] }) });
1318
- };
1319
- function ConditionalTooltip({ children, tooltip }) {
1320
- if (typeof tooltip === "string") {
1321
- return /* @__PURE__ */ jsxRuntime.jsx(FlatTooltip, { size: "tiny", description: tooltip, children });
1322
- }
1323
- if (tooltip && typeof tooltip === "object" && "description" in tooltip && tooltip.use !== false) {
1324
- return /* @__PURE__ */ jsxRuntime.jsx(FlatTooltip, { size: tooltip.size || "tiny", ...tooltip, children });
1325
- }
1326
- return children;
1327
- }
1328
- FlatTooltip.displayName = "FlatTooltip";
1329
- ConditionalTooltip.displayName = "ConditionalTooltip";
1330
724
  var iconButtonSizeClasses = {
1331
725
  xsmall: "size-6",
1332
726
  small: "size-7",
@@ -1334,7 +728,7 @@ var iconButtonSizeClasses = {
1334
728
  large: "size-10",
1335
729
  xlarge: "size-12"
1336
730
  };
1337
- var IconButton = React2.forwardRef(
731
+ var IconButton = React.forwardRef(
1338
732
  ({
1339
733
  className,
1340
734
  tooltip,
@@ -1352,11 +746,11 @@ var IconButton = React2.forwardRef(
1352
746
  variant,
1353
747
  ...props
1354
748
  };
1355
- return /* @__PURE__ */ jsxRuntime.jsx(ConditionalTooltip, { tooltip, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ref, ...buttonProps }) });
749
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkCMKUMLDS_js.ConditionalTooltip, { tooltip, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ref, ...buttonProps }) });
1356
750
  }
1357
751
  );
1358
752
  IconButton.displayName = "IconButton";
1359
- var ButtonGroup = React2.forwardRef(
753
+ var ButtonGroup = React.forwardRef(
1360
754
  ({
1361
755
  variant = "contained",
1362
756
  iconOnly = false,
@@ -1396,7 +790,7 @@ var ButtonGroup = React2.forwardRef(
1396
790
  onClick: item.onClick,
1397
791
  size
1398
792
  };
1399
- return /* @__PURE__ */ jsxRuntime.jsx(ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ...iconBaseProps, color: "assistive", variant: "contained" }) : /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ...iconBaseProps, color: "primary", variant: "outlined" }) }, item.id);
793
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkCMKUMLDS_js.ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ...iconBaseProps, color: "assistive", variant: "contained" }) : /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ...iconBaseProps, color: "primary", variant: "outlined" }) }, item.id);
1400
794
  }
1401
795
  const buttonBaseProps = {
1402
796
  className: utils.cn(roundedClasses, dividerClasses, mergeClasses, hoverClasses),
@@ -1404,7 +798,7 @@ var ButtonGroup = React2.forwardRef(
1404
798
  onClick: item.onClick,
1405
799
  size
1406
800
  };
1407
- return /* @__PURE__ */ jsxRuntime.jsx(ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsxRuntime.jsx(Button, { ...buttonBaseProps, color: "assistive", variant: "contained", children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { ...buttonBaseProps, color: "primary", variant: "outlined", children: item.label }) }, item.id);
801
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkCMKUMLDS_js.ConditionalTooltip, { tooltip: item.tooltip, children: variant === "contained" ? /* @__PURE__ */ jsxRuntime.jsx(Button, { ...buttonBaseProps, color: "assistive", variant: "contained", children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { ...buttonBaseProps, color: "primary", variant: "outlined", children: item.label }) }, item.id);
1408
802
  })
1409
803
  }
1410
804
  );
@@ -1481,7 +875,7 @@ var stateClasses = [
1481
875
  "disabled:data-[state=checked]:bg-solid-accent-disabled disabled:data-[state=indeterminate]:bg-solid-accent-disabled",
1482
876
  "disabled:data-[state=checked]:border-transparent disabled:data-[state=indeterminate]:border-transparent"
1483
877
  ];
1484
- var Checkbox = React2.forwardRef(
878
+ var Checkbox = React.forwardRef(
1485
879
  ({
1486
880
  className,
1487
881
  label,
@@ -1494,7 +888,7 @@ var Checkbox = React2.forwardRef(
1494
888
  defaultChecked,
1495
889
  ...props
1496
890
  }, ref) => {
1497
- const uniqueId = React2.useId();
891
+ const uniqueId = React.useId();
1498
892
  const checkboxId = id || uniqueId;
1499
893
  const checkboxState = checked === "indeterminate" ? "indeterminate" : checked ? "checked" : "unchecked";
1500
894
  const checkboxProps = {
@@ -1565,12 +959,12 @@ var labelVariants2 = utils.cva(
1565
959
  defaultVariants: { size: "medium" }
1566
960
  }
1567
961
  );
1568
- var Radio = React2.forwardRef(
962
+ var Radio = React.forwardRef(
1569
963
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { ref, className: utils.cn("grid gap-2", className), ...props })
1570
964
  );
1571
- Radio.Item = React2.forwardRef(
965
+ Radio.Item = React.forwardRef(
1572
966
  ({ className, size = "medium", label, labelPosition = "right", id, disabled, ...props }, ref) => {
1573
- const uniqueId = React2.useId();
967
+ const uniqueId = React.useId();
1574
968
  const radioId = id || uniqueId;
1575
969
  const control = /* @__PURE__ */ jsxRuntime.jsx(
1576
970
  RadioGroupPrimitive__namespace.Item,
@@ -1662,9 +1056,9 @@ var switchLabelVariants = utils.cva(
1662
1056
  }
1663
1057
  }
1664
1058
  );
1665
- var Switch = React2.forwardRef(
1059
+ var Switch = React.forwardRef(
1666
1060
  ({ className, size = "medium", label, labelPosition = "right", id, ...props }, ref) => {
1667
- const switchId = React2.useId();
1061
+ const switchId = React.useId();
1668
1062
  const finalId = id || switchId;
1669
1063
  const switchElement = /* @__PURE__ */ jsxRuntime.jsx(
1670
1064
  SwitchPrimitives__namespace.Root,
@@ -1715,7 +1109,7 @@ function DatePickerDayButton({
1715
1109
  function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
1716
1110
  const dayPickerProps = { ...rest, mode: type };
1717
1111
  const defaultClassNames = reactDayPicker.getDefaultClassNames();
1718
- const [month, setMonth] = React2.useState(
1112
+ const [month, setMonth] = React.useState(
1719
1113
  dayPickerProps.month ?? dayPickerProps.defaultMonth ?? /* @__PURE__ */ new Date()
1720
1114
  );
1721
1115
  const rangeSelected = type === "range" ? rest.selected : void 0;
@@ -1813,17 +1207,17 @@ function DatePicker({ type = "single", showOutsideDays = true, ...rest }) {
1813
1207
  }
1814
1208
  );
1815
1209
  }
1816
- var TextAreaContext = React2.createContext(null);
1210
+ var TextAreaContext = React.createContext(null);
1817
1211
  var useTextAreaContext = () => {
1818
- const context = React2.useContext(TextAreaContext);
1212
+ const context = React.useContext(TextAreaContext);
1819
1213
  if (!context) {
1820
1214
  throw new Error("TextArea components must be used within a TextArea");
1821
1215
  }
1822
1216
  return context;
1823
1217
  };
1824
1218
  var textAreaVariants = {
1825
- container: commonInputVariants.container,
1826
- label: commonInputVariants.label,
1219
+ container: chunkCMKUMLDS_js.commonInputVariants.container,
1220
+ label: chunkCMKUMLDS_js.commonInputVariants.label,
1827
1221
  field: utils.cva(
1828
1222
  "scrollbar-overlay block w-full resize-none rounded-medium border transition-colors focus:outline-none",
1829
1223
  {
@@ -1871,7 +1265,7 @@ var textAreaVariants = {
1871
1265
  },
1872
1266
  defaultVariants: { size: "medium" }
1873
1267
  }),
1874
- description: commonInputVariants.description,
1268
+ description: chunkCMKUMLDS_js.commonInputVariants.description,
1875
1269
  counter: utils.cva("text-nowrap font-regular", {
1876
1270
  variants: {
1877
1271
  disabled: {
@@ -1882,7 +1276,7 @@ var textAreaVariants = {
1882
1276
  defaultVariants: { disabled: false }
1883
1277
  })
1884
1278
  };
1885
- var TextArea = React2__namespace.forwardRef(
1279
+ var TextArea = React__namespace.forwardRef(
1886
1280
  ({
1887
1281
  children,
1888
1282
  variant = "fill",
@@ -1894,7 +1288,7 @@ var TextArea = React2__namespace.forwardRef(
1894
1288
  className,
1895
1289
  ...textAreaProps
1896
1290
  }, ref) => {
1897
- const uniqueId = React2.useId();
1291
+ const uniqueId = React.useId();
1898
1292
  const id = `text-area-${uniqueId}`;
1899
1293
  const { onChange, ...restTextAreaProps } = textAreaProps;
1900
1294
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -1906,7 +1300,7 @@ var TextArea = React2__namespace.forwardRef(
1906
1300
  );
1907
1301
  }
1908
1302
  );
1909
- TextArea.Label = React2__namespace.forwardRef(
1303
+ TextArea.Label = React__namespace.forwardRef(
1910
1304
  ({ children, required = false, className }, ref) => {
1911
1305
  const { size, disabled, id } = useTextAreaContext();
1912
1306
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -1920,7 +1314,7 @@ TextArea.Label = React2__namespace.forwardRef(
1920
1314
  );
1921
1315
  }
1922
1316
  );
1923
- TextArea.Field = React2__namespace.forwardRef(
1317
+ TextArea.Field = React__namespace.forwardRef(
1924
1318
  ({ className, onFocus, onBlur, ...props }, ref) => {
1925
1319
  const {
1926
1320
  variant,
@@ -1932,7 +1326,7 @@ TextArea.Field = React2__namespace.forwardRef(
1932
1326
  value: contextValue,
1933
1327
  onChange: contextOnChange
1934
1328
  } = useTextAreaContext();
1935
- const [focused, setFocused] = React2__namespace.useState(false);
1329
+ const [focused, setFocused] = React__namespace.useState(false);
1936
1330
  const handleFocus = (e) => {
1937
1331
  setFocused(true);
1938
1332
  onFocus?.(e);
@@ -1962,7 +1356,7 @@ TextArea.Field = React2__namespace.forwardRef(
1962
1356
  );
1963
1357
  }
1964
1358
  );
1965
- TextArea.Description = React2__namespace.forwardRef(
1359
+ TextArea.Description = React__namespace.forwardRef(
1966
1360
  ({ children, showCounter = true, className }, ref) => {
1967
1361
  const { size, error, disabled, value = "", maxLength } = useTextAreaContext();
1968
1362
  if (!children && (!showCounter || !maxLength)) {
@@ -1982,17 +1376,17 @@ TextArea.displayName = "TextArea";
1982
1376
  TextArea.Label.displayName = "TextArea.Label";
1983
1377
  TextArea.Field.displayName = "TextArea.Field";
1984
1378
  TextArea.Description.displayName = "TextArea.Description";
1985
- var TextFieldContext = React2.createContext(null);
1379
+ var TextFieldContext = React.createContext(null);
1986
1380
  var useTextFieldContext = () => {
1987
- const context = React2.useContext(TextFieldContext);
1381
+ const context = React.useContext(TextFieldContext);
1988
1382
  if (!context) {
1989
1383
  throw new Error("TextField components must be used within a TextField");
1990
1384
  }
1991
1385
  return context;
1992
1386
  };
1993
1387
  var textFieldVariants = {
1994
- container: commonInputVariants.container,
1995
- label: commonInputVariants.label,
1388
+ container: chunkCMKUMLDS_js.commonInputVariants.container,
1389
+ label: chunkCMKUMLDS_js.commonInputVariants.label,
1996
1390
  wrapper: utils.cva(
1997
1391
  "flex w-full flex-row items-center rounded-medium border transition-colors focus-within:border-border-focused focus-within:outline-none",
1998
1392
  {
@@ -2099,7 +1493,7 @@ var textFieldVariants = {
2099
1493
  defaultVariants: { size: "medium" }
2100
1494
  })
2101
1495
  };
2102
- var TextField = React2.forwardRef(
1496
+ var TextField = React.forwardRef(
2103
1497
  ({
2104
1498
  children,
2105
1499
  variant = "fill",
@@ -2112,12 +1506,12 @@ var TextField = React2.forwardRef(
2112
1506
  onChange,
2113
1507
  ...inputProps
2114
1508
  }, ref) => {
2115
- const uniqueId = React2.useId();
1509
+ const uniqueId = React.useId();
2116
1510
  const id = providedId || `text-field-${uniqueId}`;
2117
1511
  return /* @__PURE__ */ jsxRuntime.jsx(TextFieldContext.Provider, { value: { variant, size, error, disabled, id, value, onChange }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn(textFieldVariants.container, className), children: children || /* @__PURE__ */ jsxRuntime.jsx(TextField.Input, { ...inputProps }) }) });
2118
1512
  }
2119
1513
  );
2120
- TextField.Label = React2.forwardRef(
1514
+ TextField.Label = React.forwardRef(
2121
1515
  ({ children, required = false, className }, ref) => {
2122
1516
  const { size, disabled, id } = useTextFieldContext();
2123
1517
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2131,7 +1525,7 @@ TextField.Label = React2.forwardRef(
2131
1525
  );
2132
1526
  }
2133
1527
  );
2134
- TextField.Input = React2.forwardRef(
1528
+ TextField.Input = React.forwardRef(
2135
1529
  ({ className, leftIcon, rightIcon, subText, ...props }, ref) => {
2136
1530
  const {
2137
1531
  variant,
@@ -2179,7 +1573,7 @@ TextField.Input = React2.forwardRef(
2179
1573
  ] });
2180
1574
  }
2181
1575
  );
2182
- TextField.Description = React2.forwardRef(
1576
+ TextField.Description = React.forwardRef(
2183
1577
  ({ children, className }, ref) => {
2184
1578
  const { size, error, disabled } = useTextFieldContext();
2185
1579
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2264,12 +1658,12 @@ var MODAL_PADDING = {
2264
1658
  body: "px-4 pb-4",
2265
1659
  footer: "px-4 py-3"
2266
1660
  };
2267
- var ModalContext = React2.createContext({ size: "medium" });
1661
+ var ModalContext = React.createContext({ size: "medium" });
2268
1662
  var Modal = DialogPrimitive__namespace.Root;
2269
1663
  Modal.Trigger = DialogPrimitive__namespace.Trigger;
2270
1664
  Modal.Portal = DialogPrimitive__namespace.Portal;
2271
- Modal.Close = React2.forwardRef(({ size, ...props }, ref) => {
2272
- const { size: modalSize } = React2.useContext(ModalContext);
1665
+ Modal.Close = React.forwardRef(({ size, ...props }, ref) => {
1666
+ const { size: modalSize } = React.useContext(ModalContext);
2273
1667
  return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2274
1668
  Button,
2275
1669
  {
@@ -2281,7 +1675,7 @@ Modal.Close = React2.forwardRef(({ size, ...props }, ref) => {
2281
1675
  }
2282
1676
  ) });
2283
1677
  });
2284
- Modal.Overlay = React2.forwardRef(
1678
+ Modal.Overlay = React.forwardRef(
2285
1679
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2286
1680
  DialogPrimitive__namespace.Overlay,
2287
1681
  {
@@ -2294,7 +1688,7 @@ Modal.Overlay = React2.forwardRef(
2294
1688
  }
2295
1689
  )
2296
1690
  );
2297
- Modal.Content = React2.forwardRef(
1691
+ Modal.Content = React.forwardRef(
2298
1692
  ({ className, children, size = "medium", onInteractOutside, onFocusOutside, ...props }, ref) => {
2299
1693
  const isFullSize = size === "fullsize";
2300
1694
  const sizeWidthMap = {
@@ -2350,9 +1744,9 @@ Modal.Content = React2.forwardRef(
2350
1744
  ] }) });
2351
1745
  }
2352
1746
  );
2353
- Modal.Header = React2.forwardRef(
1747
+ Modal.Header = React.forwardRef(
2354
1748
  ({ className, line = false, showCloseIcon = true, children, ...props }, ref) => {
2355
- const { size } = React2.useContext(ModalContext);
1749
+ const { size } = React.useContext(ModalContext);
2356
1750
  return /* @__PURE__ */ jsxRuntime.jsxs(
2357
1751
  "div",
2358
1752
  {
@@ -2380,7 +1774,7 @@ Modal.Header = React2.forwardRef(
2380
1774
  );
2381
1775
  }
2382
1776
  );
2383
- Modal.Body = React2.forwardRef(
1777
+ Modal.Body = React.forwardRef(
2384
1778
  ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2385
1779
  "div",
2386
1780
  {
@@ -2394,9 +1788,9 @@ Modal.Body = React2.forwardRef(
2394
1788
  }
2395
1789
  )
2396
1790
  );
2397
- Modal.Footer = React2.forwardRef(
1791
+ Modal.Footer = React.forwardRef(
2398
1792
  ({ className, line = true, ...props }, ref) => {
2399
- const { size } = React2.useContext(ModalContext);
1793
+ const { size } = React.useContext(ModalContext);
2400
1794
  return /* @__PURE__ */ jsxRuntime.jsx(
2401
1795
  "div",
2402
1796
  {
@@ -2413,9 +1807,9 @@ Modal.Footer = React2.forwardRef(
2413
1807
  );
2414
1808
  }
2415
1809
  );
2416
- Modal.FooterDescription = React2.forwardRef(
1810
+ Modal.FooterDescription = React.forwardRef(
2417
1811
  ({ className, error = false, icon, children, ...props }, ref) => {
2418
- const { size } = React2.useContext(ModalContext);
1812
+ const { size } = React.useContext(ModalContext);
2419
1813
  const isLargeFooter = size === "fullsize";
2420
1814
  return /* @__PURE__ */ jsxRuntime.jsxs(
2421
1815
  "div",
@@ -2436,8 +1830,8 @@ Modal.FooterDescription = React2.forwardRef(
2436
1830
  );
2437
1831
  }
2438
1832
  );
2439
- Modal.Actions = React2.forwardRef(({ className, ...props }, ref) => {
2440
- const { size } = React2.useContext(ModalContext);
1833
+ Modal.Actions = React.forwardRef(({ className, ...props }, ref) => {
1834
+ const { size } = React.useContext(ModalContext);
2441
1835
  return /* @__PURE__ */ jsxRuntime.jsx(
2442
1836
  "div",
2443
1837
  {
@@ -2451,9 +1845,9 @@ Modal.Actions = React2.forwardRef(({ className, ...props }, ref) => {
2451
1845
  }
2452
1846
  );
2453
1847
  });
2454
- Modal.Action = React2.forwardRef(
1848
+ Modal.Action = React.forwardRef(
2455
1849
  ({ color = "primary", size, ...props }, ref) => {
2456
- const { size: modalSize } = React2.useContext(ModalContext);
1850
+ const { size: modalSize } = React.useContext(ModalContext);
2457
1851
  return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2458
1852
  Button,
2459
1853
  {
@@ -2466,7 +1860,7 @@ Modal.Action = React2.forwardRef(
2466
1860
  ) });
2467
1861
  }
2468
1862
  );
2469
- Modal.Title = React2.forwardRef(
1863
+ Modal.Title = React.forwardRef(
2470
1864
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2471
1865
  DialogPrimitive__namespace.Title,
2472
1866
  {
@@ -2479,7 +1873,7 @@ Modal.Title = React2.forwardRef(
2479
1873
  }
2480
1874
  )
2481
1875
  );
2482
- Modal.Description = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1876
+ Modal.Description = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2483
1877
  DialogPrimitive__namespace.Description,
2484
1878
  {
2485
1879
  ref,
@@ -2501,11 +1895,11 @@ Modal.Actions.displayName = "Modal.Actions";
2501
1895
  Modal.Action.displayName = "Modal.Action";
2502
1896
  Modal.Title.displayName = "Modal.Title";
2503
1897
  Modal.Description.displayName = "Modal.Description";
2504
- var MessageBoxContext = React2.createContext({ variant: "default" });
1898
+ var MessageBoxContext = React.createContext({ variant: "default" });
2505
1899
  var MessageBoxRoot = (props) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { ...props });
2506
1900
  var MessageBox = MessageBoxRoot;
2507
1901
  MessageBox.Trigger = DialogPrimitive__namespace.Trigger;
2508
- MessageBox.Content = React2.forwardRef(({ className, children, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(MessageBoxContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
1902
+ MessageBox.Content = React.forwardRef(({ className, children, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(MessageBoxContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
2509
1903
  /* @__PURE__ */ jsxRuntime.jsx(
2510
1904
  DialogPrimitive__namespace.Overlay,
2511
1905
  {
@@ -2527,7 +1921,7 @@ MessageBox.Content = React2.forwardRef(({ className, children, variant = "defaul
2527
1921
  }
2528
1922
  )
2529
1923
  ] }) }));
2530
- MessageBox.Title = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1924
+ MessageBox.Title = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2531
1925
  DialogPrimitive__namespace.Title,
2532
1926
  {
2533
1927
  ref,
@@ -2535,7 +1929,7 @@ MessageBox.Title = React2.forwardRef(({ className, ...props }, ref) => /* @__PUR
2535
1929
  ...props
2536
1930
  }
2537
1931
  ));
2538
- MessageBox.Description = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1932
+ MessageBox.Description = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2539
1933
  DialogPrimitive__namespace.Description,
2540
1934
  {
2541
1935
  ref,
@@ -2543,15 +1937,15 @@ MessageBox.Description = React2.forwardRef(({ className, ...props }, ref) => /*
2543
1937
  ...props
2544
1938
  }
2545
1939
  ));
2546
- MessageBox.Actions = React2.forwardRef(
1940
+ MessageBox.Actions = React.forwardRef(
2547
1941
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn("flex flex-row gap-2", className), ...props })
2548
1942
  );
2549
- MessageBox.Cancel = React2.forwardRef(
1943
+ MessageBox.Cancel = React.forwardRef(
2550
1944
  ({ size = "medium", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ref, color: "assistive", variant: "contained", size, ...props }) })
2551
1945
  );
2552
- MessageBox.Action = React2.forwardRef(
1946
+ MessageBox.Action = React.forwardRef(
2553
1947
  ({ size = "medium", ...props }, ref) => {
2554
- const { variant } = React2.useContext(MessageBoxContext);
1948
+ const { variant } = React.useContext(MessageBoxContext);
2555
1949
  return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2556
1950
  Button,
2557
1951
  {
@@ -2622,7 +2016,7 @@ var spinnerVariants = utils.cva(
2622
2016
  }
2623
2017
  }
2624
2018
  );
2625
- var Loading = React2.forwardRef(
2019
+ var Loading = React.forwardRef(
2626
2020
  ({
2627
2021
  isLoading = true,
2628
2022
  dim = true,
@@ -2689,7 +2083,7 @@ var gaugeVariants = utils.cva("h-full rounded-full bg-icon-accent transition-[wi
2689
2083
  size: "medium"
2690
2084
  }
2691
2085
  });
2692
- var Progress = React2.forwardRef(
2086
+ var Progress = React.forwardRef(
2693
2087
  ({ value = 0, max = 100, size = "medium", trackClassName, gaugeClassName, className, ...props }, ref) => {
2694
2088
  const clampedValue = Math.min(Math.max(value, 0), max);
2695
2089
  const percent = max > 0 ? clampedValue / max * 100 : 0;
@@ -2760,7 +2154,7 @@ var Toaster = ({ ...props }) => {
2760
2154
  )
2761
2155
  ] });
2762
2156
  };
2763
- Toaster.Container = React2__namespace.forwardRef(
2157
+ Toaster.Container = React__namespace.forwardRef(
2764
2158
  ({ className, children, ...props }, ref) => {
2765
2159
  return /* @__PURE__ */ jsxRuntime.jsx(
2766
2160
  "div",
@@ -2777,7 +2171,7 @@ Toaster.Container = React2__namespace.forwardRef(
2777
2171
  );
2778
2172
  }
2779
2173
  );
2780
- Toaster.Icon = React2__namespace.forwardRef(
2174
+ Toaster.Icon = React__namespace.forwardRef(
2781
2175
  ({ className, children, ...props }, ref) => {
2782
2176
  return /* @__PURE__ */ jsxRuntime.jsx(
2783
2177
  "div",
@@ -2790,7 +2184,7 @@ Toaster.Icon = React2__namespace.forwardRef(
2790
2184
  );
2791
2185
  }
2792
2186
  );
2793
- Toaster.Title = React2__namespace.forwardRef(
2187
+ Toaster.Title = React__namespace.forwardRef(
2794
2188
  ({ className, children, ...props }, ref) => {
2795
2189
  return /* @__PURE__ */ jsxRuntime.jsx(
2796
2190
  "div",
@@ -2806,7 +2200,7 @@ Toaster.Title = React2__namespace.forwardRef(
2806
2200
  );
2807
2201
  }
2808
2202
  );
2809
- Toaster.Description = React2__namespace.forwardRef(
2203
+ Toaster.Description = React__namespace.forwardRef(
2810
2204
  ({ className, children, ...props }, ref) => {
2811
2205
  return /* @__PURE__ */ jsxRuntime.jsx(
2812
2206
  "div",
@@ -2823,7 +2217,7 @@ Toaster.Description = React2__namespace.forwardRef(
2823
2217
  );
2824
2218
  }
2825
2219
  );
2826
- Toaster.Action = React2__namespace.forwardRef(
2220
+ Toaster.Action = React__namespace.forwardRef(
2827
2221
  ({ className, children, altText, ...props }, ref) => {
2828
2222
  return /* @__PURE__ */ jsxRuntime.jsx(
2829
2223
  "button",
@@ -3042,6 +2436,31 @@ function useToast() {
3042
2436
  };
3043
2437
  }
3044
2438
 
2439
+ // src/utils.ts
2440
+ var buttonize = (fn) => {
2441
+ return {
2442
+ role: "button",
2443
+ onClick: fn,
2444
+ onKeyDown: (event) => {
2445
+ if (event.key === "Enter") {
2446
+ fn(event);
2447
+ }
2448
+ }
2449
+ };
2450
+ };
2451
+
2452
+ Object.defineProperty(exports, "Segment", {
2453
+ enumerable: true,
2454
+ get: function () { return chunkCMKUMLDS_js.Segment; }
2455
+ });
2456
+ Object.defineProperty(exports, "Select", {
2457
+ enumerable: true,
2458
+ get: function () { return chunkCMKUMLDS_js.Select; }
2459
+ });
2460
+ Object.defineProperty(exports, "Tooltip", {
2461
+ enumerable: true,
2462
+ get: function () { return chunkCMKUMLDS_js.Tooltip; }
2463
+ });
3045
2464
  exports.Avatar = Avatar;
3046
2465
  exports.Badge = Badge;
3047
2466
  exports.Breadcrumb = Breadcrumb;
@@ -3058,8 +2477,6 @@ exports.Progress = Progress;
3058
2477
  exports.Radio = Radio;
3059
2478
  exports.ScrollArea = ScrollArea;
3060
2479
  exports.ScrollBar = ScrollBar;
3061
- exports.Segment = Segment;
3062
- exports.Select = Select;
3063
2480
  exports.Star = Star;
3064
2481
  exports.Switch = Switch;
3065
2482
  exports.Tabs = Tabs;
@@ -3068,7 +2485,7 @@ exports.TextArea = TextArea;
3068
2485
  exports.TextField = TextField;
3069
2486
  exports.ToastProvider = ToastProvider;
3070
2487
  exports.Toaster = Toaster;
3071
- exports.Tooltip = Tooltip;
2488
+ exports.buttonize = buttonize;
3072
2489
  exports.toast = toast;
3073
2490
  exports.useToast = useToast;
3074
2491
  //# sourceMappingURL=index.js.map