@g4rcez/components 2.2.9 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/components/core/button.d.ts.map +1 -1
  2. package/dist/components/core/polymorph.d.ts.map +1 -1
  3. package/dist/components/core/slot.d.ts +1 -1
  4. package/dist/components/core/slot.d.ts.map +1 -1
  5. package/dist/components/core/slot.jsx +28 -35
  6. package/dist/components/core/tag.jsx +1 -1
  7. package/dist/components/core/typography.d.ts.map +1 -1
  8. package/dist/components/core/typography.jsx +16 -20
  9. package/dist/components/display/alert.d.ts.map +1 -1
  10. package/dist/components/display/alert.jsx +22 -24
  11. package/dist/components/display/calendar.d.ts.map +1 -1
  12. package/dist/components/display/calendar.jsx +5 -7
  13. package/dist/components/display/card.d.ts.map +1 -1
  14. package/dist/components/display/card.jsx +5 -5
  15. package/dist/components/display/empty.jsx +1 -1
  16. package/dist/components/display/notifications.d.ts.map +1 -1
  17. package/dist/components/display/notifications.jsx +35 -35
  18. package/dist/components/display/progress.d.ts.map +1 -1
  19. package/dist/components/display/progress.jsx +6 -8
  20. package/dist/components/display/shortcut.jsx +1 -1
  21. package/dist/components/display/skeleton.d.ts.map +1 -1
  22. package/dist/components/display/skeleton.jsx +3 -5
  23. package/dist/components/display/step.d.ts.map +1 -1
  24. package/dist/components/display/step.jsx +27 -27
  25. package/dist/components/display/tabs.d.ts.map +1 -1
  26. package/dist/components/display/tabs.jsx +5 -7
  27. package/dist/components/floating/command-palette.d.ts.map +1 -1
  28. package/dist/components/floating/command-palette.jsx +40 -40
  29. package/dist/components/floating/dropdown.d.ts.map +1 -1
  30. package/dist/components/floating/dropdown.jsx +15 -15
  31. package/dist/components/floating/modal.d.ts.map +1 -1
  32. package/dist/components/floating/modal.jsx +73 -67
  33. package/dist/components/floating/tooltip.d.ts.map +1 -1
  34. package/dist/components/floating/tooltip.jsx +2 -8
  35. package/dist/components/floating/wizard.d.ts +1 -1
  36. package/dist/components/floating/wizard.d.ts.map +1 -1
  37. package/dist/components/floating/wizard.jsx +50 -53
  38. package/dist/components/form/autocomplete.d.ts.map +1 -1
  39. package/dist/components/form/autocomplete.jsx +38 -35
  40. package/dist/components/form/checkbox.jsx +2 -2
  41. package/dist/components/form/date-picker.d.ts.map +1 -1
  42. package/dist/components/form/date-picker.jsx +14 -14
  43. package/dist/components/form/file-upload.jsx +13 -13
  44. package/dist/components/form/free-text.d.ts.map +1 -1
  45. package/dist/components/form/free-text.jsx +2 -2
  46. package/dist/components/form/input-field.d.ts.map +1 -1
  47. package/dist/components/form/input-field.jsx +42 -41
  48. package/dist/components/form/multi-select.d.ts.map +1 -1
  49. package/dist/components/form/multi-select.jsx +56 -56
  50. package/dist/components/form/select.d.ts.map +1 -1
  51. package/dist/components/form/select.jsx +13 -13
  52. package/dist/components/form/slider.d.ts.map +1 -1
  53. package/dist/components/form/slider.jsx +10 -10
  54. package/dist/components/form/transfer-list.jsx +3 -3
  55. package/dist/components/index.d.ts +1 -0
  56. package/dist/components/index.d.ts.map +1 -1
  57. package/dist/components/index.js +1 -0
  58. package/dist/components/page-calendar/calendar-header.d.ts +16 -0
  59. package/dist/components/page-calendar/calendar-header.d.ts.map +1 -0
  60. package/dist/components/page-calendar/calendar-header.jsx +81 -0
  61. package/dist/components/page-calendar/day-view.d.ts +12 -0
  62. package/dist/components/page-calendar/day-view.d.ts.map +1 -0
  63. package/dist/components/page-calendar/day-view.jsx +84 -0
  64. package/dist/components/page-calendar/event-pill.d.ts +9 -0
  65. package/dist/components/page-calendar/event-pill.d.ts.map +1 -0
  66. package/dist/components/page-calendar/event-pill.jsx +23 -0
  67. package/dist/components/page-calendar/index.d.ts +4 -0
  68. package/dist/components/page-calendar/index.d.ts.map +1 -0
  69. package/dist/components/page-calendar/index.js +2 -0
  70. package/dist/components/page-calendar/month-view.d.ts +11 -0
  71. package/dist/components/page-calendar/month-view.d.ts.map +1 -0
  72. package/dist/components/page-calendar/month-view.jsx +47 -0
  73. package/dist/components/page-calendar/page-calendar.d.ts +18 -0
  74. package/dist/components/page-calendar/page-calendar.d.ts.map +1 -0
  75. package/dist/components/page-calendar/page-calendar.jsx +39 -0
  76. package/dist/components/page-calendar/page-calendar.types.d.ts +18 -0
  77. package/dist/components/page-calendar/page-calendar.types.d.ts.map +1 -0
  78. package/dist/components/page-calendar/page-calendar.types.js +1 -0
  79. package/dist/components/page-calendar/page-calendar.utils.d.ts +18 -0
  80. package/dist/components/page-calendar/page-calendar.utils.d.ts.map +1 -0
  81. package/dist/components/page-calendar/page-calendar.utils.js +71 -0
  82. package/dist/components/page-calendar/week-view.d.ts +11 -0
  83. package/dist/components/page-calendar/week-view.d.ts.map +1 -0
  84. package/dist/components/page-calendar/week-view.jsx +61 -0
  85. package/dist/components/table/filter.jsx +4 -4
  86. package/dist/components/table/index.d.ts.map +1 -1
  87. package/dist/components/table/index.jsx +10 -10
  88. package/dist/components/table/inner-table.d.ts.map +1 -1
  89. package/dist/components/table/inner-table.jsx +18 -18
  90. package/dist/components/table/metadata.d.ts.map +1 -1
  91. package/dist/components/table/metadata.jsx +29 -30
  92. package/dist/components/table/pagination.jsx +1 -1
  93. package/dist/components/table/row.d.ts.map +1 -1
  94. package/dist/components/table/row.jsx +17 -17
  95. package/dist/components/table/sort.jsx +1 -1
  96. package/dist/components/table/table-lib.d.ts.map +1 -1
  97. package/dist/components/table/table-lib.js +1 -2
  98. package/dist/components/table/thead.d.ts.map +1 -1
  99. package/dist/components/table/thead.jsx +5 -5
  100. package/dist/config/context.d.ts.map +1 -1
  101. package/dist/config/default-translations.d.ts +10 -0
  102. package/dist/config/default-translations.d.ts.map +1 -1
  103. package/dist/config/default-translations.jsx +11 -1
  104. package/dist/constants.d.ts.map +1 -1
  105. package/dist/hooks/use-components-provider.d.ts.map +1 -1
  106. package/dist/hooks/use-components-provider.jsx +2 -2
  107. package/dist/hooks/use-form.d.ts.map +1 -1
  108. package/dist/hooks/use-input-id.d.ts.map +1 -1
  109. package/dist/hooks/use-is-coarse-device.js +1 -1
  110. package/dist/hooks/use-preferences.d.ts.map +1 -1
  111. package/dist/hooks/use-resize-observer.d.ts.map +1 -1
  112. package/dist/hooks/use-translations.d.ts +10 -0
  113. package/dist/hooks/use-translations.d.ts.map +1 -1
  114. package/dist/index.css +1 -1
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js.map +1 -1
  117. package/dist/index.mjs +10121 -9704
  118. package/dist/index.mjs.map +1 -1
  119. package/dist/index.umd.js +14 -14
  120. package/dist/index.umd.js.map +1 -1
  121. package/dist/lib/dom.d.ts.map +1 -1
  122. package/dist/lib/fns.d.ts.map +1 -1
  123. package/dist/lib/fns.js +2 -2
  124. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  125. package/dist/styles/theme.types.d.ts.map +1 -1
  126. package/package.json +289 -289
@@ -1 +1 @@
1
- {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/components/display/step.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA2C,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAEnI,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,KAAK,gBAAgB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AA+BlH,KAAK,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAiCF,eAAO,MAAM,cAAc,+BAAgC,CAAC;AAE5D,eAAO,MAAM,IAAI,GAAI,gEAAgE,SAAS,sBA0F7F,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,sBA0BrF,CAAC"}
1
+ {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/components/display/step.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA2C,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAEnI,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,KAAK,gBAAgB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AA+BlH,KAAK,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AA2BF,eAAO,MAAM,cAAc,+BAAgC,CAAC;AAE5D,eAAO,MAAM,IAAI,GAAI,gEAAgE,SAAS,sBA6F7F,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,sBA0BrF,CAAC"}
@@ -11,17 +11,17 @@ const states = {
11
11
  animate: { pathLength: 1, opacity: 1 },
12
12
  };
13
13
  const ErrorIcon = (props) => (<svg {...props} viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
14
- <motion.path className="currentColor" initial={states.initial} animate={states.animate} transition={iconTransitions} d="M18 6 6 18"/>
15
- <motion.path className="currentColor" initial={states.initial} animate={states.animate} transition={iconTransitions} d="m6 6 12 12"/>
16
- </svg>);
14
+ <motion.path className="currentColor" initial={states.initial} animate={states.animate} transition={iconTransitions} d="M18 6 6 18"/>
15
+ <motion.path className="currentColor" initial={states.initial} animate={states.animate} transition={iconTransitions} d="m6 6 12 12"/>
16
+ </svg>);
17
17
  const CheckIcon = (props) => (<svg {...props} fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={3}>
18
- <motion.path d="M5 13l4 4L19 7" strokeLinecap="round" strokeLinejoin="round" animate={states.animate} initial={states.initial} transition={iconTransitions}/>
19
- </svg>);
18
+ <motion.path d="M5 13l4 4L19 7" strokeLinecap="round" strokeLinejoin="round" animate={states.animate} initial={states.initial} transition={iconTransitions}/>
19
+ </svg>);
20
20
  const variants = {
21
21
  complete: { scale: 1.25 },
22
- active: { scale: 1, transition: { delay: 0, duration: 0.3 } }
22
+ active: { scale: 1, transition: { delay: 0, duration: 0.3 } },
23
23
  };
24
- const transitions = { duration: 0.6, delay: 0.2, type: "tween", ease: "circOut", };
24
+ const transitions = { duration: 0.6, delay: 0.2, type: "tween", ease: "circOut" };
25
25
  const getCurrentStatus = (step, currentStep, status) => {
26
26
  if (status === "error")
27
27
  return "error";
@@ -65,12 +65,12 @@ export const Step = ({ step, currentStep, status, title, titleClassName, ...prop
65
65
  return () => clearTimeout(timer);
66
66
  }, [currentStep, context, step]);
67
67
  const innerStatus = getCurrentStatus(step, visualCurrentStep, status);
68
- const widthPerStep = context?.steps ? 100 / (context?.steps) : undefined;
68
+ const widthPerStep = context?.steps ? 100 / context?.steps : undefined;
69
69
  return (<Fragment>
70
- <div className={`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${innerStatus === "active" || innerStatus === "complete" ? "bg-success" : ""}`}/>
71
- <motion.button {...props} type="button" data-step={step} animate={innerStatus} className="flex relative justify-center items-center w-auto text-center">
72
- <motion.div variants={variants} transition={transitions} className={`hidden xl:block absolute inset-0 rounded-full text-center ${innerStatus === "error" ? "bg-danger" : ""}`}/>
73
- <motion.div initial={false} animate={innerStatus} transition={transition} className="flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square" variants={{
70
+ <div className={`hidden h-[2px] w-full bg-card-border first:hidden xl:block ${innerStatus === "active" || innerStatus === "complete" ? "bg-success" : ""}`}/>
71
+ <motion.button {...props} type="button" data-step={step} animate={innerStatus} className="relative flex w-auto items-center justify-center text-center">
72
+ <motion.div variants={variants} transition={transitions} className={`absolute inset-0 hidden rounded-full text-center xl:block ${innerStatus === "error" ? "bg-danger" : ""}`}/>
73
+ <motion.div initial={false} animate={innerStatus} transition={transition} className="relative flex aspect-square size-10 items-center justify-center rounded-full font-semibold" variants={{
74
74
  error: {
75
75
  color: parser("var(--danger-foreground)"),
76
76
  borderColor: parser("var(--danger-hover)"),
@@ -95,17 +95,17 @@ export const Step = ({ step, currentStep, status, title, titleClassName, ...prop
95
95
  backgroundColor: parser("var(--success-DEFAULT)"),
96
96
  },
97
97
  }}>
98
- <div className="flex justify-center items-center">
99
- {innerStatus === "complete" ? (<CheckIcon className="size-6 text-primary-foreground"/>) : innerStatus === "error" ? (<ErrorIcon className="size-6 text-danger-foreground"/>) : (<Fragment>
100
- <span>{step}</span>
101
- </Fragment>)}
102
- </div>
103
- </motion.div>
104
- <header className="flex flex-col justify-start items-start px-2">
105
- <h3 className={`h-full whitespace-nowrap flex items-center ${titleClassName}`}>{title}</h3>
106
- </header>
107
- </motion.button>
108
- </Fragment>);
98
+ <div className="flex items-center justify-center">
99
+ {innerStatus === "complete" ? (<CheckIcon className="size-6 text-primary-foreground"/>) : innerStatus === "error" ? (<ErrorIcon className="size-6 text-danger-foreground"/>) : (<Fragment>
100
+ <span>{step}</span>
101
+ </Fragment>)}
102
+ </div>
103
+ </motion.div>
104
+ <header className="flex flex-col items-start justify-start px-2">
105
+ <h3 className={`flex h-full items-center whitespace-nowrap ${titleClassName}`}>{title}</h3>
106
+ </header>
107
+ </motion.button>
108
+ </Fragment>);
109
109
  };
110
110
  export const Steps = (props) => {
111
111
  const previousStepRef = useRef(props.currentStep);
@@ -124,8 +124,8 @@ export const Steps = (props) => {
124
124
  steps: React.Children.count(props.children),
125
125
  };
126
126
  return (<StepContext.Provider value={contextValue}>
127
- <div className="flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center">
128
- {props.children}
129
- </div>
130
- </StepContext.Provider>);
127
+ <div className="relative flex w-full flex-col items-start justify-center gap-4 lg:flex-row lg:items-center lg:justify-between">
128
+ {props.children}
129
+ </div>
130
+ </StepContext.Provider>);
131
131
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/display/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA2B,iBAAiB,EAAiC,MAAM,OAAO,CAAC;AAMzG,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAiCF,eAAO,MAAM,IAAI,GAAI,OAAO,iBAAiB,CAAC,SAAS,CAAC,sBAsFvD,CAAC;AAIF,KAAK,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CA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CAC9B,CACN,CAAC;AAEN,eAAO,MAAM,GAAG,GAAI,OAAO,iBAAiB,CAAC,QAAQ,CAAC,sBAGrD,CAAC"}
@@ -17,9 +17,7 @@ const getNElement = (elements, currentIndex, direction) => {
17
17
  if (!isElementDisabled(element))
18
18
  return element;
19
19
  }
20
- return direction === "backward"
21
- ? getNElement(elements, elements.length - 1, "backward")
22
- : getNElement(elements, -1, "forward");
20
+ return direction === "backward" ? getNElement(elements, elements.length - 1, "backward") : getNElement(elements, -1, "forward");
23
21
  };
24
22
  const moveOn = (ul, direction) => {
25
23
  const items = Array.from(ul.querySelectorAll("li"));
@@ -73,15 +71,15 @@ export const Tabs = (props) => {
73
71
  }
74
72
  };
75
73
  return (<Context.Provider value={active}>
76
- <Card className={props.className} container={css("pt-0 max-w-full w-full min-w-0", props.container)} header={<header className="overflow-x-auto relative mb-2">
77
- <div className="absolute bottom-0 w-full h-[1px] bg-card-border"/>
74
+ <Card className={props.className} container={css("pt-0 max-w-full w-full min-w-0", props.container)} header={<header className="relative mb-2 overflow-x-auto">
75
+ <div className="absolute bottom-0 h-[1px] w-full bg-card-border"/>
78
76
  <nav className="min-w-0">
79
- <ul onKeyDown={onKeyDown} ref={ref} className="flex overflow-x-auto flex-1 justify-start w-0 min-w-full">
77
+ <ul onKeyDown={onKeyDown} ref={ref} className="flex w-0 min-w-full flex-1 justify-start overflow-x-auto">
80
78
  {items.map((x) => {
81
79
  const inner = x.props;
82
80
  const current = active === inner.id;
83
81
  return (<li data-id={inner.id} data-active={current} key={`tab-header-${inner.id}`} aria-disabled={inner.disabled} className={css("relative w-fit border-b border-transparent transition-all", current ? "border-primary font-medium text-primary" : "", inner.disabled ? "aria-disabled:text-disabled" : "")}>
84
- <Polymorph as="button" type="button" data-id={inner.id} aria-current="page" disabled={inner.disabled} onClick={inner.disabled ? undefined : onClick} className="block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed">
82
+ <Polymorph as="button" type="button" data-id={inner.id} aria-current="page" disabled={inner.disabled} onClick={inner.disabled ? undefined : onClick} className="block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed">
85
83
  {inner.title}
86
84
  </Polymorph>
87
85
  </li>);
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/components/floating/command-palette.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,WAAW,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAmE,MAAM,OAAO,CAAC;AAQxF,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,GAAG;IACzD,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG,OAAO,CAAC;CACrD,CAAC;AAEF,KAAK,IAAI,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC,CAAC;AAEpD,KAAK,mBAAmB,GAAG,WAAW,CACpC,UAAU,EACV;IACE,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,IAAI,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QACjC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QAClC,KAAK,EAAE,aAAa,GAAG,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,aAAa,CAAC;KAC/D,KAAK,IAAI,GAAG,O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AO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QAAE,OAAO,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChE,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAC;CACnF,CAAC;AAgCF,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,sBA0LxD,CAAC"}
@@ -12,26 +12,26 @@ import { fzf } from "../../lib/fzf";
12
12
  import { Shortcut } from "../display/shortcut";
13
13
  import { SkeletonCell } from "../display/skeleton";
14
14
  import { Modal } from "./modal";
15
- const Group = (props) => (<span className="flex items-center h-full text-sm font-medium text-left text-secondary">
16
- {isReactFC(props.item.title) ? <props.item.title text={props.text}/> : props.item.title}
17
- </span>);
15
+ const Group = (props) => (<span className="flex h-full items-center text-left text-sm font-medium text-secondary">
16
+ {isReactFC(props.item.title) ? <props.item.title text={props.text}/> : props.item.title}
17
+ </span>);
18
18
  const Item = forwardRef((props, ref) => {
19
19
  const id = useId();
20
20
  const active = props.active;
21
21
  const item = props.item;
22
22
  if (item.type === "group")
23
- return (<div id={id} className="px-2 pt-2 pb-1 h-10">
24
- <Group text={props.text} item={item}/>
25
- </div>);
23
+ return (<div id={id} className="h-10 px-2 pb-1 pt-2">
24
+ <Group text={props.text} item={item}/>
25
+ </div>);
26
26
  if (item.type !== "shortcut")
27
27
  return <Fragment />;
28
28
  return (<button {...props} id={id} ref={ref} role="option" type="button" aria-selected={active} data-component="command-palette-item" className={css("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover", active ? "bg-floating-hover" : "")}>
29
- <span className="flex gap-2 items-center">
30
- {item.Icon ? item.Icon : null}
31
- <span>{isReactFC(item.title) ? <item.title text={props.text}/> : item.title}</span>
32
- </span>
33
- {item.shortcut ? <Shortcut value={item.shortcut}/> : null}
34
- </button>);
29
+ <span className="flex items-center gap-2">
30
+ {item.Icon ? item.Icon : null}
31
+ <span>{isReactFC(item.title) ? <item.title text={props.text}/> : item.title}</span>
32
+ </span>
33
+ {item.shortcut ? <Shortcut value={item.shortcut}/> : null}
34
+ </button>);
35
35
  });
36
36
  const getFuzzyData = (commands, value) => {
37
37
  if (value.length === 0)
@@ -92,7 +92,7 @@ export const CommandPalette = (props) => {
92
92
  openOnArrowKeyDown: true,
93
93
  scrollItemIntoView: false,
94
94
  selectedIndex: activeIndex,
95
- disabledIndices: n => {
95
+ disabledIndices: (n) => {
96
96
  const item = fuzzy[n];
97
97
  if (item)
98
98
  return item.type === "group";
@@ -108,7 +108,7 @@ export const CommandPalette = (props) => {
108
108
  return n;
109
109
  return props.open ? (prev ?? 0) : null;
110
110
  });
111
- }
111
+ },
112
112
  });
113
113
  const { getItemProps, getReferenceProps, getFloatingProps } = useInteractions([listNav]);
114
114
  const displayItems = text === ""
@@ -139,12 +139,12 @@ export const CommandPalette = (props) => {
139
139
  }, [bindKey, commands, props, valueRef]);
140
140
  const Icon = props.Icon ?? FilterIcon;
141
141
  return (<Fragment>
142
- <Modal {...getFloatingProps()} animated={false} closable={false} open={props.open} overlayClickClose ariaTitle="Command palette" bodyClassName="px-0 py-0 pt-0" data-component="command-palette" onChange={props.onChangeVisibility} className="container relative py-0 md:max-w-screen-sm lg:max-w-screen-md overflow-clip">
143
- <header className="flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background">
144
- <div className="flex justify-center items-center size-10">
145
- {props.Icon ? <Icon Default={FilterIcon} text={text} size={16}/> : <FilterIcon size={16}/>}
146
- </div>
147
- <input {...getReferenceProps({
142
+ <Modal {...getFloatingProps()} animated={false} closable={false} open={props.open} overlayClickClose ariaTitle="Command palette" bodyClassName="px-0 py-0 pt-0" data-component="command-palette" onChange={props.onChangeVisibility} className="container relative overflow-clip py-0 md:max-w-screen-sm lg:max-w-screen-md">
143
+ <header className="sticky top-0 isolate z-floating flex h-12 w-full items-center overflow-clip border-b border-floating-border bg-floating-background">
144
+ <div className="flex size-10 items-center justify-center">
145
+ {props.Icon ? <Icon Default={FilterIcon} text={text} size={16}/> : <FilterIcon size={16}/>}
146
+ </div>
147
+ <input {...getReferenceProps({
148
148
  ref: root.refs.setReference,
149
149
  onKeyDown: (e) => {
150
150
  const item = Is.number(activeIndex) ? displayItems[activeIndex] : null;
@@ -160,17 +160,17 @@ export const CommandPalette = (props) => {
160
160
  item.action({ event: e, text: text, setOpen: props.onChangeVisibility, setText });
161
161
  }
162
162
  }
163
- }
164
- })} autoFocus value={text} data-combikeysbypass="true" placeholder="Search for..." onChange={(e) => setText(e.target.value)} className="items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-none"/>
165
- </header>
166
- {props.loading ? (<ul role="listbox" data-component="command-palette-list" className="flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]">
167
- <div className="px-2 pt-2 pb-1 h-10">{translations.commandPaletteLoading}</div>
168
- {loadingSkeleton.map((_, i) => (<li key={`${id}-${i}-skeleton-index`} className={css("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground")}>
169
- {SkeletonCell}
170
- </li>))}
171
- </ul>) : (<div className="flex flex-row flex-nowrap min-w-full" data-component="command-palette-container">
172
- <ul role="listbox" ref={scrollContainerRef} data-component="command-palette-list" className="flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]">
173
- {displayItems.map((item, index) => (<Item {...getItemProps({
163
+ },
164
+ })} autoFocus value={text} data-combikeysbypass="true" placeholder="Search for..." onChange={(e) => setText(e.target.value)} className="h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none"/>
165
+ </header>
166
+ {props.loading ? (<ul role="listbox" data-component="command-palette-list" className="my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2">
167
+ <div className="h-10 px-2 pb-1 pt-2">{translations.commandPaletteLoading}</div>
168
+ {loadingSkeleton.map((_, i) => (<li key={`${id}-${i}-skeleton-index`} className={css("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground")}>
169
+ {SkeletonCell}
170
+ </li>))}
171
+ </ul>) : (<div className="flex min-w-full flex-row flex-nowrap" data-component="command-palette-container">
172
+ <ul role="listbox" ref={scrollContainerRef} data-component="command-palette-list" className="my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2">
173
+ {displayItems.map((item, index) => (<Item {...getItemProps({
174
174
  onMouseEnter: () => setActiveIndex(index),
175
175
  ref(node) {
176
176
  listRef.current[index] = node;
@@ -182,13 +182,13 @@ export const CommandPalette = (props) => {
182
182
  item.action({ event: e, text: text, setOpen: props.onChangeVisibility, setText });
183
183
  },
184
184
  })} item={item} text={text} active={activeIndex === index} key={`${id}-${item.type}-${index}`}/>))}
185
- {displayItems.length === 1 ? (<div className={css("flex items-center justify-between rounded-lg p-2 text-secondary")}>
186
- {translations.commandPaletteEmpty ?? props.emptyMessage}
187
- </div>) : null}
188
- </ul>
189
- {props.Preview && Is.number(activeIndex) ? <props.Preview command={displayItems[activeIndex]} text={text}/> : null}
190
- </div>)}
191
- {props.footer ? <footer className="flex items-center p-2 h-8 rounded-b-lg border-t border-floating-border">{props.footer}</footer> : null}
192
- </Modal>
193
- </Fragment>);
185
+ {displayItems.length === 1 ? (<div className={css("flex items-center justify-between rounded-lg p-2 text-secondary")}>
186
+ {translations.commandPaletteEmpty ?? props.emptyMessage}
187
+ </div>) : null}
188
+ </ul>
189
+ {props.Preview && Is.number(activeIndex) ? <props.Preview command={displayItems[activeIndex]} text={text}/> : null}
190
+ </div>)}
191
+ {props.footer ? (<footer className="flex h-8 items-center rounded-b-lg border-t border-floating-border p-2">{props.footer}</footer>) : null}
192
+ </Modal>
193
+ </Fragment>);
194
194
  };
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/floating/dropdown.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAY,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAExG,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;CACvD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,iBAAiB,CAAC,aAAa,CAAC,sBAqE/D,CAAC"}
1
+ {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/floating/dropdown.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAY,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAExG,KAAK,aAAa,GAAG;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,iBAAiB,CAAC,aAAa,CAAC,sBAqE/D,CAAC"}
@@ -35,19 +35,19 @@ export const Dropdown = (props) => {
35
35
  const role = useRole(context, { role: "tooltip" });
36
36
  const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss, role]);
37
37
  return (<Fragment>
38
- <button ref={refs.setReference} {...getReferenceProps(props.buttonProps)} type="button">
39
- {props.trigger}
40
- </button>
41
- {open && (<FloatingPortal preserveTabOrder id={`${headingId}-portal`}>
42
- <FloatingFocusManager guards restoreFocus={true} returnFocus={true} visuallyHiddenDismiss context={context} modal={false}>
43
- <div className="relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating" ref={refs.setFloating} aria-labelledby={headingId} style={floatingStyles} {...getFloatingProps()}>
44
- <FloatingArrow ref={arrowRef} context={context} strokeWidth={0.1} className="fill-floating-background stroke-floating-border"/>
45
- <header className="mb-2">
46
- <h3 className="text-2xl font-medium tracking-wide leading-snug text-left">{props.title}</h3>
47
- </header>
48
- {props.children}
49
- </div>
50
- </FloatingFocusManager>
51
- </FloatingPortal>)}
52
- </Fragment>);
38
+ <button ref={refs.setReference} {...getReferenceProps(props.buttonProps)} type="button">
39
+ {props.trigger}
40
+ </button>
41
+ {open && (<FloatingPortal preserveTabOrder id={`${headingId}-portal`}>
42
+ <FloatingFocusManager guards restoreFocus={true} returnFocus={true} visuallyHiddenDismiss context={context} modal={false}>
43
+ <div className="relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating" ref={refs.setFloating} aria-labelledby={headingId} style={floatingStyles} {...getFloatingProps()}>
44
+ <FloatingArrow ref={arrowRef} context={context} strokeWidth={0.1} className="fill-floating-background stroke-floating-border"/>
45
+ <header className="mb-2">
46
+ <h3 className="text-left text-2xl font-medium leading-snug tracking-wide">{props.title}</h3>
47
+ </header>
48
+ {props.children}
49
+ </div>
50
+ </FloatingFocusManager>
51
+ </FloatingPortal>)}
52
+ </Fragment>);
53
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/floating/modal.tsx"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAmB,eAAe,EAA4F,MAAM,cAAc,CAAC;AAE1J,OAAO,KAAsI,MAAM,OAAO,CAAC;AAG3J,OAAO,EAAE,KAAK,EAAO,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAU,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMrD,eAAO,MAAM,UAAU,kBAF8B,cAAc,KAAK,OAAO,CAAC,OAAO,CAEvB,CAAC;AAEjE,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAuD9C,MAAM,MAAM,UAAU,GAAG,QAAQ,CAC/B,eAAe,CAAC,KAAK,CAAC,EACtB,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,GAAG;IAC9E,IAAI,EAAE,OAAO,CAAC;IACd,QA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K,CAAC,SAAS,CAAA;CAAE,sBAuD/E,CAAC"}
@@ -2,9 +2,9 @@
2
2
  import { FloatingFocusManager, FloatingOverlay, FloatingPortal, useClick, useDismiss, useFloating, useInteractions, useRole, } from "@floating-ui/react";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { XIcon } from "lucide-react";
5
- import { AnimatePresence, motion, MotionConfig, useMotionValue, animate } from "motion/react";
5
+ import { AnimatePresence, motion, MotionConfig, useMotionValue, animate, } from "motion/react";
6
6
  import { Slot } from "../core/slot";
7
- import React, { forwardRef, Fragment, useEffect, useId, useImperativeHandle, useRef, useState, useCallback } from "react";
7
+ import React, { forwardRef, Fragment, useEffect, useId, useImperativeHandle, useRef, useState, useCallback, } from "react";
8
8
  import { useMediaQuery } from "../../hooks/use-media-query";
9
9
  import { css, mergeRefs } from "../../lib/dom";
10
10
  import { useFloatingRef } from "../../hooks/use-floating-ref";
@@ -79,13 +79,13 @@ const Draggable = (props) => {
79
79
  return props.value.set(value);
80
80
  }
81
81
  };
82
- return (<motion.button draggable dragListener dragMomentum type="button" animate={false} dragElastic={0} dragPropagation initial={false} onDrag={onDrag} dragSnapToOrigin dragDirectionLock drag={props.sheet ? "y" : "x"} dragConstraints={dragConstraints} whileDrag={{ cursor: "grabbing" }} className={css("absolute rounded-lg isolate z-calendar", props.sheet ? "cursor-row-resize" : "cursor-col-resize bg-floating-border", props.sheet
82
+ return (<motion.button draggable dragListener dragMomentum type="button" animate={false} dragElastic={0} dragPropagation initial={false} onDrag={onDrag} dragSnapToOrigin dragDirectionLock drag={props.sheet ? "y" : "x"} dragConstraints={dragConstraints} whileDrag={{ cursor: "grabbing" }} className={css("absolute isolate z-calendar rounded-lg", props.sheet ? "cursor-row-resize" : "cursor-col-resize bg-floating-border", props.sheet
83
83
  ? "top-1 flex h-3 w-full justify-center py-2"
84
84
  : props.position === "left"
85
85
  ? "right-5 top-1/2 h-10 w-2"
86
86
  : "left-2 top-1/2 h-10 w-2")}>
87
- {props.sheet ? <div className="w-1/4 h-2 rounded-lg bg-floating-border"/> : null}
88
- </motion.button>);
87
+ {props.sheet ? <div className="h-2 w-1/4 rounded-lg bg-floating-border"/> : null}
88
+ </motion.button>);
89
89
  };
90
90
  const positions = { drawer: "right", sheet: "none", dialog: "none" };
91
91
  const fetchPosition = (isDesktop, forceType, propsType, propsPosition) => {
@@ -129,7 +129,10 @@ export const Modal = forwardRef(({ open, title, footer, asChild, trigger, childr
129
129
  sheetY.set(undefined);
130
130
  }, [type, floatingSize, sheetY]);
131
131
  const onClose = () => onChange(false);
132
- useImperativeHandle(externalRef, () => ({ context: floating.context, floating: removeScrollRef.current }), [floating.context, removeScrollRef]);
132
+ useImperativeHandle(externalRef, () => ({ context: floating.context, floating: removeScrollRef.current }), [
133
+ floating.context,
134
+ removeScrollRef,
135
+ ]);
133
136
  const onDragHeader = (_, info) => {
134
137
  const div = floating.refs.floating.current;
135
138
  const rect = div.getBoundingClientRect();
@@ -145,35 +148,37 @@ export const Modal = forwardRef(({ open, title, footer, asChild, trigger, childr
145
148
  onChange?.(false);
146
149
  return setTimeout(() => floatingSize.set(undefined), 350);
147
150
  };
148
- const draggableMotionProps = type === "sheet" ? {
149
- drag: "y",
150
- animate: false,
151
- dragElastic: 0,
152
- initial: false,
153
- dragConstraints,
154
- draggable: true,
155
- dragListener: true,
156
- dragMomentum: true,
157
- onDrag: onDragHeader,
158
- dragPropagation: true,
159
- dragSnapToOrigin: true,
160
- dragDirectionLock: true,
161
- whileDrag: { cursor: "grabbing" },
162
- } : { animate: animated, initial: false };
151
+ const draggableMotionProps = type === "sheet"
152
+ ? {
153
+ drag: "y",
154
+ animate: false,
155
+ dragElastic: 0,
156
+ initial: false,
157
+ dragConstraints,
158
+ draggable: true,
159
+ dragListener: true,
160
+ dragMomentum: true,
161
+ onDrag: onDragHeader,
162
+ dragPropagation: true,
163
+ dragSnapToOrigin: true,
164
+ dragDirectionLock: true,
165
+ whileDrag: { cursor: "grabbing" },
166
+ }
167
+ : { animate: animated, initial: false };
163
168
  const scrollInitial = useMotionValue(undefined);
164
169
  const scroll = useMotionValue(undefined);
165
170
  const Component = asChild ? Slot : motion.button;
166
171
  return (<Fragment>
167
- {trigger ? (<Component ref={floating.refs.setReference} {...interactions.getReferenceProps()} layoutId={layoutId} type="button">
168
- {Trigger}
169
- </Component>) : null}
170
- <MotionConfig reducedMotion={animated ? "user" : "always"}>
171
- <FloatingPortal preserveTabOrder root={root}>
172
- <AnimatePresence mode="wait" propagate>
173
- {open ? (<FloatingOverlay lockScroll className={css("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-[100dvh] !overflow-clip", type === "drawer" ? "" : "items-start justify-center lg:p-10 pt-10", overlayClassName)}>
174
- <FloatingFocusManager guards modal closeOnFocusOut={closeOnFocusOut} context={floating.context}>
175
- <AnimatePresence propagate>
176
- <motion.div {...props} {...(title
172
+ {trigger ? (<Component ref={floating.refs.setReference} {...interactions.getReferenceProps()} layoutId={layoutId} type="button">
173
+ {Trigger}
174
+ </Component>) : null}
175
+ <MotionConfig reducedMotion={animated ? "user" : "always"}>
176
+ <FloatingPortal preserveTabOrder root={root}>
177
+ <AnimatePresence mode="wait" propagate>
178
+ {open ? (<FloatingOverlay lockScroll className={css("inset-0 isolate z-overlay flex h-[100dvh] !overflow-clip bg-floating-overlay/70", type === "drawer" ? "" : "items-start justify-center pt-10 lg:p-10", overlayClassName)}>
179
+ <FloatingFocusManager guards modal closeOnFocusOut={closeOnFocusOut} context={floating.context}>
180
+ <AnimatePresence propagate>
181
+ <motion.div {...props} {...(title
177
182
  ? {
178
183
  "aria-labelledby": headingId,
179
184
  "aria-describedby": descriptionId,
@@ -183,20 +188,21 @@ export const Modal = forwardRef(({ open, title, footer, asChild, trigger, childr
183
188
  ref: mergeRefs(floating.refs.setFloating, removeScrollRef),
184
189
  className: css(variants({ position, type }), className, "isolate overscroll-contain"),
185
190
  })} exit="exit" layout={true} animate="enter" initial="initial" layoutId={layoutId} variants={animation} data-component="modal" style={type === "drawer" ? { width: floatingSize } : { height: floatingSize, y: sheetY }}>
186
- {useResizer && resizer ? (<Draggable onChange={onChange} value={floatingSize} sheet={type === "sheet"} position={position} parent={floating.refs.floating}/>) : null}
187
- {title ? (<motion.header {...draggableMotionProps} className="relative w-full isolate">
188
- {title ? (<h2 id={headingId} className="block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border">
189
- {title}
190
- </h2>) : null}
191
- </motion.header>) : null}
192
- <motion.section ref={innerContent} data-component="modal-body" className={css("flex-1 select-text overflow-y-auto px-8 py-1", bodyClassName)} onTouchEnd={async () => {
191
+ {useResizer && resizer ? (<Draggable onChange={onChange} value={floatingSize} sheet={type === "sheet"} position={position} parent={floating.refs.floating}/>) : null}
192
+ {title ? (<motion.header {...draggableMotionProps} className="relative isolate w-full">
193
+ {title ? (<h2 id={headingId} className="block select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed">
194
+ {title}
195
+ </h2>) : null}
196
+ </motion.header>) : null}
197
+ <motion.section ref={innerContent} data-component="modal-body" className={css("flex-1 select-text overflow-y-auto px-8 py-1", bodyClassName)} onTouchEnd={async () => {
193
198
  scroll.set(undefined);
194
199
  scrollInitial.set(undefined);
195
200
  if (isDragging.current) {
196
201
  const currentY = sheetY.get() || 0;
197
202
  const threshold = window.innerHeight * 0.2;
198
203
  if (currentY > threshold) {
199
- await animate(sheetY, window.innerHeight, { duration: 0.2, ease: "easeIn" }).finished;
204
+ await animate(sheetY, window.innerHeight, { duration: 0.2, ease: "easeIn" })
205
+ .finished;
200
206
  onChange(false);
201
207
  }
202
208
  else {
@@ -229,22 +235,22 @@ export const Modal = forwardRef(({ open, title, footer, asChild, trigger, childr
229
235
  }
230
236
  scroll.set(y);
231
237
  }}>
232
- {children}
233
- </motion.section>
234
- {footer ? (<footer className="px-8 pt-4 w-full border-t select-text border-floating-border">{footer}</footer>) : null}
235
- {closable ? (<nav className="absolute top-1 right-4 z-floating">
236
- <button type="button" onClick={onClose} className="p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger">
237
- <XIcon />
238
- </button>
239
- </nav>) : null}
240
- </motion.div>
241
- </AnimatePresence>
242
- </FloatingFocusManager>
243
- </FloatingOverlay>) : null}
244
- </AnimatePresence>
245
- </FloatingPortal>
246
- </MotionConfig>
247
- </Fragment>);
238
+ {children}
239
+ </motion.section>
240
+ {footer ? (<footer className="w-full select-text border-t border-floating-border px-8 pt-4">{footer}</footer>) : null}
241
+ {closable ? (<nav className="absolute right-4 top-1 z-floating">
242
+ <button type="button" onClick={onClose} className="p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger">
243
+ <XIcon />
244
+ </button>
245
+ </nav>) : null}
246
+ </motion.div>
247
+ </AnimatePresence>
248
+ </FloatingFocusManager>
249
+ </FloatingOverlay>) : null}
250
+ </AnimatePresence>
251
+ </FloatingPortal>
252
+ </MotionConfig>
253
+ </Fragment>);
248
254
  });
249
255
  let confirmGlobal = async (options) => {
250
256
  if (typeof window !== "undefined") {
@@ -278,16 +284,16 @@ export const ModalConfirmProvider = ({ children }) => {
278
284
  resolve(value ?? false);
279
285
  };
280
286
  return (<ConfirmContext.Provider value={confirmAction}>
281
- {children}
282
- <Modal open={open} type="dialog" closable={false} onChange={setOpen} overlayClickClose={false} title={options.title || "Confirmation"} className="container max-w-dialog lg:max-w-96" footer={<div className="flex gap-2 justify-end">
283
- <Button theme={options.cancel?.theme || "ghost-muted"} onClick={onCancel}>
284
- {options.cancel?.text || "Cancel"}
285
- </Button>
286
- <Button theme={options.confirm?.theme || "primary"} onClick={onConfirm}>
287
- {options.confirm?.text || "Confirm"}
288
- </Button>
289
- </div>}>
290
- <div className="py-2 text-foreground">{options.description}</div>
291
- </Modal>
292
- </ConfirmContext.Provider>);
287
+ {children}
288
+ <Modal open={open} type="dialog" closable={false} onChange={setOpen} overlayClickClose={false} title={options.title || "Confirmation"} className="container max-w-dialog lg:max-w-96" footer={<div className="flex justify-end gap-2">
289
+ <Button theme={options.cancel?.theme || "ghost-muted"} onClick={onCancel}>
290
+ {options.cancel?.text || "Cancel"}
291
+ </Button>
292
+ <Button theme={options.confirm?.theme || "primary"} onClick={onConfirm}>
293
+ {options.confirm?.text || "Confirm"}
294
+ </Button>
295
+ </div>}>
296
+ <div className="py-2 text-foreground">{options.description}</div>
297
+ </Modal>
298
+ </ConfirmContext.Provider>);
293
299
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/floating/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAQH,KAAK,SAAS,EAWjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,EAAa,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAI9E,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,gBAAgB,CAC7E;IACI,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,EACD,CAAC,CACJ,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,SAAS,aAAa,GAAG,MAAM,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,YAyF9E,CAAC"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/floating/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAQH,KAAK,SAAS,EAWjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,EAAa,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAI9E,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,gBAAgB,CAC7E;IACI,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,EACD,CAAC,CACJ,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,SAAS,aAAa,GAAG,MAAM,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,YAmF9E,CAAC"}
@@ -18,13 +18,7 @@ export const Tooltip = forwardRef(function Tooltip({ as, open, title, children,
18
18
  open: innerOpen,
19
19
  whileElementsMounted: autoUpdate,
20
20
  onOpenChange: open ? undefined : toggleBoth,
21
- middleware: [
22
- shift(),
23
- offset(5),
24
- autoPlacement(),
25
- arrow({ padding: 5, element: arrowRef }),
26
- flip({ fallbackAxisSideDirection: "start" }),
27
- ],
21
+ middleware: [shift(), offset(5), autoPlacement(), arrow({ padding: 5, element: arrowRef }), flip({ fallbackAxisSideDirection: "start" })],
28
22
  });
29
23
  const dismiss = useDismiss(context, { enabled });
30
24
  const role = useRole(context, { role: "tooltip", enabled });
@@ -55,7 +49,7 @@ export const Tooltip = forwardRef(function Tooltip({ as, open, title, children,
55
49
  {title}
56
50
  </Component>
57
51
  {innerOpen && (<FloatingPortal>
58
- <Polymorph {...getFloatingProps()} ref={refs.setFloating} style={floatingStyles} className="p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating">
52
+ <Polymorph {...getFloatingProps()} ref={refs.setFloating} style={floatingStyles} className="isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating">
59
53
  <FloatingArrow ref={arrowRef} context={context} strokeWidth={0.1} className="fill-tooltip-background stroke-tooltip-border"/>
60
54
  {children}
61
55
  </Polymorph>
@@ -22,5 +22,5 @@ export type WizardProps = {
22
22
  previous?: string;
23
23
  };
24
24
  };
25
- export declare const Wizard: ({ steps, active, onClose, onFinish, onChange, labels: labelsProp, }: WizardProps) => React.JSX.Element | null;
25
+ export declare const Wizard: ({ steps, active, onClose, onFinish, onChange, labels: labelsProp }: WizardProps) => React.JSX.Element | null;
26
26
  //# sourceMappingURL=wizard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../../../src/components/floating/wizard.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,SAAS,EAKV,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAgF,MAAM,OAAO,CAAC;AAOrG,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,O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