@rovula/ui 0.0.19 → 0.0.21

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 (207) hide show
  1. package/dist/cjs/bundle.css +3220 -1382
  2. package/dist/cjs/bundle.js +3 -3
  3. package/dist/cjs/bundle.js.map +1 -1
  4. package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +4 -4
  5. package/dist/cjs/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
  6. package/dist/cjs/types/components/Button/Button.styles copy.d.ts +7 -0
  7. package/dist/cjs/types/components/Button/Button.styles.d.ts +1 -0
  8. package/dist/cjs/types/components/Button/Buttons.stories.d.ts +12 -4
  9. package/dist/cjs/types/components/Calendar/Calendar.d.ts +0 -1
  10. package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +7 -7
  11. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
  12. package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +2 -0
  13. package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +2 -0
  14. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
  15. package/dist/cjs/types/components/Input/Input.stories.d.ts +12 -12
  16. package/dist/cjs/types/components/Label/Label.stories.d.ts +6 -6
  17. package/dist/cjs/types/components/Loading/Loading.d.ts +14 -0
  18. package/dist/cjs/types/components/Loading/Loading.stories.d.ts +35 -0
  19. package/dist/cjs/types/components/ProgressBar/ProgressBar.d.ts +13 -0
  20. package/dist/cjs/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
  21. package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
  22. package/dist/cjs/types/components/Search/Search.d.ts +22 -1
  23. package/dist/cjs/types/components/Search/Search.stories.d.ts +338 -7
  24. package/dist/cjs/types/components/Table/Table.stories.d.ts +4 -4
  25. package/dist/cjs/types/components/Text/Text.d.ts +1 -1
  26. package/dist/cjs/types/components/Text/Text.stories.d.ts +1 -1
  27. package/dist/cjs/types/components/TextInput/TextInput.d.ts +4 -0
  28. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +11 -6
  29. package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +8 -0
  30. package/dist/cjs/types/index.d.ts +3 -0
  31. package/dist/cjs/types/stories/ColorGroupPreview.d.ts +1 -0
  32. package/dist/cjs/types/stories/ColorPreview.d.ts +5 -0
  33. package/dist/components/ActionButton/ActionButton.js +1 -1
  34. package/dist/components/ActionButton/ActionButton.stories.js +1 -1
  35. package/dist/components/ActionButton/ActionButton.styles copy.js +90 -0
  36. package/dist/components/ActionButton/ActionButton.styles.js +54 -15
  37. package/dist/components/AlertDialog/AlertDialog.js +2 -2
  38. package/dist/components/Avatar/Avatar.styles.js +1 -1
  39. package/dist/components/Button/Button.js +3 -2
  40. package/dist/components/Button/Button.styles copy.js +210 -0
  41. package/dist/components/Button/Button.styles.js +203 -43
  42. package/dist/components/Button/Buttons.stories.js +9 -1
  43. package/dist/components/Calendar/Calendar.js +39 -2
  44. package/dist/components/Checkbox/Checkbox.js +1 -1
  45. package/dist/components/Collapsible/Collapsible.styles.js +6 -3
  46. package/dist/components/DatePicker/DatePicker.js +13 -2
  47. package/dist/components/Dialog/Dialog.js +4 -4
  48. package/dist/components/Dropdown/Dropdown.js +9 -7
  49. package/dist/components/Dropdown/Dropdown.styles.js +1 -1
  50. package/dist/components/Input/Input.js +8 -1
  51. package/dist/components/Input/Input.stories.js +3 -2
  52. package/dist/components/Input/Input.styles.js +13 -5
  53. package/dist/components/Loading/Loading.js +23 -0
  54. package/dist/components/Loading/Loading.stories.js +37 -0
  55. package/dist/components/Popover/Popover.js +1 -1
  56. package/dist/components/ProgressBar/ProgressBar.js +22 -0
  57. package/dist/components/ProgressBar/ProgressBar.stories.js +52 -0
  58. package/dist/components/RadioGroup/RadioGroup.js +2 -2
  59. package/dist/components/Search/Search.js +6 -7
  60. package/dist/components/Search/Search.stories.js +8 -5
  61. package/dist/components/Text/Text.js +17 -2
  62. package/dist/components/Text/Text.stories.js +5 -1
  63. package/dist/components/TextInput/TextInput.js +14 -5
  64. package/dist/components/TextInput/TextInput.stories.js +3 -2
  65. package/dist/components/TextInput/TextInput.styles.js +120 -18
  66. package/dist/esm/bundle.css +3220 -1382
  67. package/dist/esm/bundle.js +3 -3
  68. package/dist/esm/bundle.js.map +1 -1
  69. package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +4 -4
  70. package/dist/esm/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
  71. package/dist/esm/types/components/Button/Button.styles copy.d.ts +7 -0
  72. package/dist/esm/types/components/Button/Button.styles.d.ts +1 -0
  73. package/dist/esm/types/components/Button/Buttons.stories.d.ts +12 -4
  74. package/dist/esm/types/components/Calendar/Calendar.d.ts +0 -1
  75. package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +7 -7
  76. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
  77. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +2 -0
  78. package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +2 -0
  79. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
  80. package/dist/esm/types/components/Input/Input.stories.d.ts +12 -12
  81. package/dist/esm/types/components/Label/Label.stories.d.ts +6 -6
  82. package/dist/esm/types/components/Loading/Loading.d.ts +14 -0
  83. package/dist/esm/types/components/Loading/Loading.stories.d.ts +35 -0
  84. package/dist/esm/types/components/ProgressBar/ProgressBar.d.ts +13 -0
  85. package/dist/esm/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
  86. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
  87. package/dist/esm/types/components/Search/Search.d.ts +22 -1
  88. package/dist/esm/types/components/Search/Search.stories.d.ts +338 -7
  89. package/dist/esm/types/components/Table/Table.stories.d.ts +4 -4
  90. package/dist/esm/types/components/Text/Text.d.ts +1 -1
  91. package/dist/esm/types/components/Text/Text.stories.d.ts +1 -1
  92. package/dist/esm/types/components/TextInput/TextInput.d.ts +4 -0
  93. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +11 -6
  94. package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +8 -0
  95. package/dist/esm/types/index.d.ts +3 -0
  96. package/dist/esm/types/stories/ColorGroupPreview.d.ts +1 -0
  97. package/dist/esm/types/stories/ColorPreview.d.ts +5 -0
  98. package/dist/index.d.ts +53 -2
  99. package/dist/index.js +3 -0
  100. package/dist/src/theme/global.css +5078 -918
  101. package/dist/stories/ColorGroupPreview.js +478 -0
  102. package/dist/stories/ColorPreview.js +8 -0
  103. package/dist/theme/global.css +7 -227
  104. package/dist/theme/main-preset.js +131 -67
  105. package/dist/theme/plugins/utilities/typography.js +12 -0
  106. package/dist/theme/presets/colors.js +101 -220
  107. package/dist/theme/theme.d.ts +69 -0
  108. package/dist/theme/themes/xspector/baseline.css +7 -0
  109. package/dist/theme/themes/xspector/color.css +67 -0
  110. package/dist/theme/themes/xspector/components/action-button.css +98 -0
  111. package/dist/theme/themes/xspector/components/loading.css +11 -0
  112. package/dist/theme/themes/xspector/palette.css +122 -0
  113. package/dist/theme/themes/xspector/state.css +89 -0
  114. package/dist/theme/themes/xspector/transparent.css +68 -0
  115. package/dist/theme/themes/xspector/typography.css +27 -0
  116. package/dist/theme/tokens/baseline.css +10 -0
  117. package/dist/theme/tokens/color.css +63 -0
  118. package/dist/theme/tokens/components/action-button.css +127 -0
  119. package/dist/theme/tokens/components/button.css +512 -0
  120. package/dist/theme/tokens/components/loading.css +11 -0
  121. package/dist/theme/tokens/components/navbar.css +8 -0
  122. package/dist/theme/tokens/components/progress-bar.css +8 -0
  123. package/dist/theme/tokens/palette.css +122 -0
  124. package/dist/theme/tokens/state.css +82 -0
  125. package/dist/theme/tokens/transparent.css +68 -0
  126. package/dist/theme/tokens/typography.css +178 -0
  127. package/dist/theme/tokens/variables.css +28 -0
  128. package/dist/theme/utils.js +98 -0
  129. package/package.json +1 -1
  130. package/src/_theme/global copy.css +761 -0
  131. package/src/_theme/global.css +39 -0
  132. package/src/_theme/main-preset.js +239 -0
  133. package/src/_theme/plugins/utilities/typography.js +81 -0
  134. package/src/_theme/presets/colors copy 2.js +319 -0
  135. package/src/_theme/presets/colors copy.js +229 -0
  136. package/src/_theme/presets/colors.js +94 -0
  137. package/src/_theme/theme.d.ts +69 -0
  138. package/src/_theme/variables/base/button.css +334 -0
  139. package/src/_theme/variables/base/components copy.css +19 -0
  140. package/src/_theme/variables/default/colors.css +292 -0
  141. package/src/_theme/variables/default/typography.css +178 -0
  142. package/src/_theme/variables/xspector/colors.css +468 -0
  143. package/src/_theme/variables/xspector/typography.css +178 -0
  144. package/src/components/ActionButton/ActionButton.stories.tsx +1 -1
  145. package/src/components/ActionButton/ActionButton.styles copy.ts +95 -0
  146. package/src/components/ActionButton/ActionButton.styles.ts +54 -19
  147. package/src/components/ActionButton/ActionButton.tsx +1 -1
  148. package/src/components/AlertDialog/AlertDialog.tsx +2 -2
  149. package/src/components/Avatar/Avatar.styles.ts +1 -1
  150. package/src/components/Button/Button.styles copy.ts +214 -0
  151. package/src/components/Button/Button.styles.ts +203 -47
  152. package/src/components/Button/Button.tsx +4 -0
  153. package/src/components/Button/Buttons.stories.tsx +9 -1
  154. package/src/components/Calendar/Calendar.tsx +49 -7
  155. package/src/components/Checkbox/Checkbox.tsx +1 -1
  156. package/src/components/Collapsible/Collapsible.styles.ts +6 -3
  157. package/src/components/DatePicker/DatePicker.tsx +8 -2
  158. package/src/components/Dialog/Dialog.tsx +5 -5
  159. package/src/components/Dropdown/Dropdown.styles.ts +1 -1
  160. package/src/components/Dropdown/Dropdown.tsx +14 -12
  161. package/src/components/Input/Input.stories.tsx +3 -2
  162. package/src/components/Input/Input.styles.tsx +13 -6
  163. package/src/components/Input/Input.tsx +8 -1
  164. package/src/components/Loading/Loading.stories.tsx +43 -0
  165. package/src/components/Loading/Loading.tsx +72 -0
  166. package/src/components/Popover/Popover.tsx +1 -1
  167. package/src/components/ProgressBar/ProgressBar.stories.tsx +78 -0
  168. package/src/components/ProgressBar/ProgressBar.tsx +62 -0
  169. package/src/components/RadioGroup/RadioGroup.tsx +2 -2
  170. package/src/components/Search/Search.stories.tsx +13 -13
  171. package/src/components/Search/Search.tsx +14 -19
  172. package/src/components/Text/Text.stories.tsx +6 -4
  173. package/src/components/Text/Text.tsx +27 -3
  174. package/src/components/TextInput/TextInput.stories.tsx +3 -2
  175. package/src/components/TextInput/TextInput.styles.ts +124 -19
  176. package/src/components/TextInput/TextInput.tsx +34 -4
  177. package/src/index.ts +3 -0
  178. package/src/stories/ColorGroupPreview.tsx +494 -0
  179. package/src/stories/ColorPreview.tsx +45 -0
  180. package/src/stories/Colors.mdx +14 -0
  181. package/src/stories/Typography.mdx +7 -151
  182. package/src/theme/global.css +7 -227
  183. package/src/theme/main-preset.js +131 -67
  184. package/src/theme/plugins/utilities/typography.js +12 -0
  185. package/src/theme/presets/colors.js +101 -220
  186. package/src/theme/theme.d.ts +69 -0
  187. package/src/theme/themes/xspector/baseline.css +7 -0
  188. package/src/theme/themes/xspector/color.css +67 -0
  189. package/src/theme/themes/xspector/components/action-button.css +98 -0
  190. package/src/theme/themes/xspector/components/loading.css +11 -0
  191. package/src/theme/themes/xspector/palette.css +122 -0
  192. package/src/theme/themes/xspector/state.css +89 -0
  193. package/src/theme/themes/xspector/transparent.css +68 -0
  194. package/src/theme/themes/xspector/typography.css +27 -0
  195. package/src/theme/tokens/baseline.css +10 -0
  196. package/src/theme/tokens/color.css +63 -0
  197. package/src/theme/tokens/components/action-button.css +127 -0
  198. package/src/theme/tokens/components/button.css +512 -0
  199. package/src/theme/tokens/components/loading.css +11 -0
  200. package/src/theme/tokens/components/navbar.css +8 -0
  201. package/src/theme/tokens/components/progress-bar.css +8 -0
  202. package/src/theme/tokens/palette.css +122 -0
  203. package/src/theme/tokens/state.css +82 -0
  204. package/src/theme/tokens/transparent.css +68 -0
  205. package/src/theme/tokens/typography.css +178 -0
  206. package/src/theme/tokens/variables.css +28 -0
  207. package/src/theme/utils.js +98 -0
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority";
2
2
  export var inputVariants = cva([
3
3
  "border-0 outline-none",
4
4
  "p-1 flex w-auto h-fit box-border",
5
- "peer text-black",
5
+ "peer text-input-filled-text placeholder:text-input-default-text bg-transparent caret-primary",
6
6
  ], {
7
7
  variants: {
8
8
  size: {
@@ -17,8 +17,12 @@ export var inputVariants = cva([
17
17
  },
18
18
  variant: {
19
19
  flat: "",
20
- outline: "ring-1 ring-inset ring-input-stroke hover:ring-input-active focus:ring-1 focus:ring-inset focus:ring-input-stroke-active",
21
- underline: "border-b-2 border-input-stroke transition-colors hover:border-input-stroke-active focus:border-input-stroke",
20
+ outline: [
21
+ "ring-1 ring-inset ring-input-default-stroke",
22
+ "hover:ring-input-active-stroke hover:text-input-filled-text",
23
+ "focus:ring-1 focus:ring-inset focus:ring-input-active-stroke focus:text-input-filled-text active:text-input-filled-text",
24
+ ],
25
+ underline: "border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-default-stroke",
22
26
  },
23
27
  hiddenPlaceholder: {
24
28
  true: "placeholder:text-transparent",
@@ -27,10 +31,14 @@ export var inputVariants = cva([
27
31
  true: "w-full",
28
32
  },
29
33
  disabled: {
30
- true: "text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled",
34
+ true: [
35
+ "text-input-disable-text ring-input-disable-stroke bg-input-disable-bg placeholder:text-input-disable-text",
36
+ "hover:text-input-disable-text hover:ring-input-disable-stroke hover:bg-input-disable-bg hover:placeholder:text-input-disable-text",
37
+ "active:text-input-disable-text active:ring-input-disable-stroke active:bg-input-disable-bg active:placeholder:text-input-disable-text",
38
+ ],
31
39
  },
32
40
  error: {
33
- true: "ring-error focus:ring-error",
41
+ true: "ring-input-error focus:ring-input-error",
34
42
  },
35
43
  },
36
44
  defaultVariants: {
@@ -0,0 +1,23 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { cn } from "@/utils/cn";
14
+ var Loading = function (_a) {
15
+ var _b = _a.size, size = _b === void 0 ? 16 : _b, _c = _a.color, color = _c === void 0 ? "" : _c, _d = _a.trackColor, trackColor = _d === void 0 ? "" : _d, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 2 : _e, _f = _a.percentage, percentage = _f === void 0 ? 75 : _f, _g = _a.animate, animate = _g === void 0 ? true : _g, className = _a.className, progressClassName = _a.progressClassName, trackClassName = _a.trackClassName;
16
+ var radius = (size - strokeWidth * 2) / 2;
17
+ var circumference = 2 * Math.PI * radius;
18
+ var offset = circumference - (percentage / 100) * circumference;
19
+ return (_jsxs("svg", { className: cn({
20
+ "animate-spin": animate,
21
+ }, className), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 ".concat(size, " ").concat(size), width: size, height: size, role: "status", "aria-live": "polite", children: [_jsx("circle", { className: cn("text-[var(--loading-track-color)]", trackClassName), style: __assign({}, (trackColor ? { color: trackColor } : {})), cx: size / 2, cy: size / 2, r: radius, stroke: "currentColor", strokeWidth: strokeWidth }), _jsx("circle", { className: cn("text-[var(--loading-process-color)]", progressClassName), style: __assign({}, (color ? { color: color } : {})), cx: size / 2, cy: size / 2, r: radius, stroke: "currentColor", strokeWidth: strokeWidth, strokeDasharray: circumference, strokeDashoffset: offset, strokeLinecap: "round" })] }));
22
+ };
23
+ export default Loading;
@@ -0,0 +1,37 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Loading from "./Loading";
14
+ var meta = {
15
+ title: "Components/Loading",
16
+ component: Loading,
17
+ tags: ["autodocs"],
18
+ parameters: {
19
+ layout: "fullscreen",
20
+ },
21
+ decorators: [
22
+ function (Story) { return (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })); },
23
+ ],
24
+ };
25
+ export default meta;
26
+ export var Default = {
27
+ args: {
28
+ // Loading: "Lorem Ipsum",
29
+ // value: "Lorem Ipsum",
30
+ // fullwidth: true,
31
+ },
32
+ render: function (args) {
33
+ console.log("args ", args);
34
+ var props = __assign({}, args);
35
+ return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx("div", { className: "flex items-center space-x-2", children: _jsx(Loading, __assign({}, props)) }) }));
36
+ },
37
+ };
@@ -29,7 +29,7 @@ var Popover = PopoverPrimitive.Root;
29
29
  var PopoverTrigger = PopoverPrimitive.Trigger;
30
30
  var PopoverContent = React.forwardRef(function (_a, ref) {
31
31
  var className = _a.className, _b = _a.align, align = _b === void 0 ? "center" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
32
- return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 min-w-72 rounded-md border bg-popup-background border-none overflow-hidden p-0 text-popover-foreground shadow-md outline-none 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
32
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 min-w-72 rounded-md border bg-base-popup-highlight border-none overflow-hidden p-0 text-popover-foreground shadow-md outline-none 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
33
33
  });
34
34
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
35
35
  export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "@/utils/cn";
3
+ import { useEffect, useState } from "react";
4
+ var ProgressBar = function (_a) {
5
+ var _b = _a.progress, progress = _b === void 0 ? 0 : _b, color = _a.color, gradientStart = _a.gradientStart, gradientEnd = _a.gradientEnd, _c = _a.animationDuration, animationDuration = _c === void 0 ? 0.5 : _c, _d = _a.height, height = _d === void 0 ? 8 : _d, trackClassName = _a.trackClassName, progressClassName = _a.progressClassName;
6
+ var _e = useState(0), width = _e[0], setWidth = _e[1];
7
+ useEffect(function () {
8
+ setWidth(progress);
9
+ }, [progress]);
10
+ var getBackgroundStyle = function () {
11
+ if (gradientStart && gradientEnd) {
12
+ return "linear-gradient(to right, ".concat(gradientStart, ", ").concat(gradientEnd, ")");
13
+ }
14
+ return color;
15
+ };
16
+ return (_jsx("div", { className: cn("w-full bg-grey2-transparent-16 rounded-full overflow-hidden", trackClassName), style: { height: "".concat(height, "px") }, children: _jsx("div", { className: cn("h-full rounded-full transition-all ease-out bg-primary", progressClassName), style: {
17
+ width: "".concat(width, "%"),
18
+ background: getBackgroundStyle(),
19
+ transition: "width ".concat(animationDuration, "s ease-out"),
20
+ } }) }));
21
+ };
22
+ export default ProgressBar;
@@ -0,0 +1,52 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useEffect, useState } from "react";
14
+ import ProgressBar from "./ProgressBar";
15
+ var meta = {
16
+ title: "Components/ProgressBar",
17
+ component: ProgressBar,
18
+ tags: ["autodocs"],
19
+ parameters: {
20
+ layout: "fullscreen",
21
+ },
22
+ decorators: [
23
+ function (Story) { return (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })); },
24
+ ],
25
+ };
26
+ export default meta;
27
+ export var Default = {
28
+ args: {},
29
+ render: function (args) {
30
+ var props = __assign({}, args);
31
+ return (_jsx("div", { className: "p-4 space-y-4 w-full", children: _jsx(ProgressBar, __assign({}, props)) }));
32
+ },
33
+ };
34
+ export var Preview = {
35
+ args: {},
36
+ render: function (args) {
37
+ console.log("args ", args);
38
+ var _a = useState(0), progress = _a[0], setProgress = _a[1];
39
+ useEffect(function () {
40
+ var timer = setInterval(function () {
41
+ setProgress(function (prevProgress) {
42
+ return prevProgress >= 100 ? 0 : prevProgress + 10;
43
+ });
44
+ }, 1000);
45
+ return function () {
46
+ clearInterval(timer);
47
+ };
48
+ }, []);
49
+ var props = __assign({}, args);
50
+ return (_jsxs("div", { className: "p-4 space-y-4 w-full", children: [_jsx(ProgressBar, { progress: progress, color: "#3b82f6", animationDuration: 0.7 }), _jsx(ProgressBar, { progress: progress, gradientStart: "#8a8a8a", gradientEnd: "#c0c0c0", animationDuration: 0.7 })] }));
51
+ },
52
+ };
@@ -32,9 +32,9 @@ var RadioGroup = React.forwardRef(function (_a, ref) {
32
32
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
33
33
  var RadioGroupItem = React.forwardRef(function (_a, ref) {
34
34
  var className = _a.className, props = __rest(_a, ["className"]);
35
- return (_jsx(RadioGroupPrimitive.Item, __assign({ ref: ref, className: cn("aspect-square h-4 w-4 rounded-full border text-primary disabled:fill-secondary-110 ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:border-secondary-110", {
35
+ return (_jsx(RadioGroupPrimitive.Item, __assign({ ref: ref, className: cn("aspect-square h-4 w-4 rounded-full border text-primary disabled:fill-state-disable-solid ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:state-disable-solid", {
36
36
  "border-primary-30 data-[state=checked]:border-primary": !props.disabled,
37
- "border-secondary-110 data-disabled:border-secondary-110 text-secondary-110 fill-secondary-110": props.disabled,
37
+ "border-state-disable-solid data-disabled:border-state-disable-solid text-state-disable-solid fill-state-disable-solid": props.disabled,
38
38
  }, className) }, props, { children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "fill-current text-current", children: _jsx("circle", { cx: "5", cy: "5", r: "5", fill: "current" }) }) }) })));
39
39
  });
40
40
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
@@ -9,11 +9,10 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Input } from "../Input/Input";
14
- import { Label } from "../Label/Label";
15
- function Search(props) {
16
- var _a;
17
- return (_jsxs("div", { className: " relative", children: [_jsx(Input, __assign({}, props, { hiddenPlaceholder: true })), _jsx(Label, { htmlFor: props.id, size: props.size, disabled: props.disabled, error: props.error, className: (_a = props.labelClassname) !== null && _a !== void 0 ? _a : "", isFloatable: true, children: "Search" })] }));
18
- }
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { forwardRef } from "react";
14
+ import Dropdown from "../Dropdown/Dropdown";
15
+ var Search = forwardRef(function (props, ref) {
16
+ return (_jsx(Dropdown, __assign({}, props, { ref: ref, hasClearIcon: true, hasSearchIcon: true, label: "Search", endIcon: null, filterMode: true })));
17
+ });
19
18
  export { Search };
@@ -23,14 +23,17 @@ var meta = {
23
23
  ],
24
24
  };
25
25
  export default meta;
26
+ var options = new Array(100).fill("").map(function (__, index) { return ({
27
+ value: "option".concat(index + 1),
28
+ label: "Option ".concat(index + 1),
29
+ }); });
26
30
  export var Default = {
27
31
  args: {
28
- error: false,
29
- // fullwidth: true,
32
+ label: "Choose an option:",
33
+ fullwidth: true,
34
+ options: options,
30
35
  },
31
36
  render: function (args) {
32
- console.log("args ", args);
33
- var props = __assign({}, args);
34
- return (_jsxs("div", { className: "flex flex-row gap-4", children: [_jsx(Search, __assign({ id: "1", size: "lg", placeholder: "Search" }, args)), _jsx(Search, __assign({ id: "2", size: "md", placeholder: "Search" }, args)), _jsx(Search, __assign({ id: "3", size: "sm", placeholder: "Search" }, args))] }));
37
+ return (_jsxs("div", { className: "flex flex-row gap-4 w-full", children: [_jsx(Search, __assign({ id: "1", size: "lg", options: options }, args)), _jsx(Search, __assign({ id: "2", size: "md", options: options }, args)), _jsx(Search, __assign({ id: "3", size: "sm", options: options }, args))] }));
35
38
  },
36
39
  };
@@ -1,8 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "@/utils/cn";
3
3
  import { forwardRef } from "react";
4
+ import { cva } from "class-variance-authority";
5
+ var textVariants = cva(["text-foreground"], {
6
+ variants: {
7
+ color: {
8
+ primary: "text-primary",
9
+ secondary: "text-secondary",
10
+ success: "text-success",
11
+ tertiary: "text-tertiary",
12
+ info: "text-info",
13
+ warning: "text-warning",
14
+ error: "text-error",
15
+ },
16
+ },
17
+ });
18
+ // TODO font, fontBold, elipt
4
19
  var Text = forwardRef(function (_a) {
5
- var _b = _a.variant, variant = _b === void 0 ? "body1" : _b, _c = _a.tag, Tag = _c === void 0 ? "p" : _c, children = _a.children, className = _a.className, color = _a.color, style = _a.style;
6
- return (_jsx(Tag, { className: cn("typography-".concat(variant, " text-").concat(color), className), style: style, children: children }));
20
+ var _b = _a.variant, variant = _b === void 0 ? "body1" : _b, _c = _a.tag, Tag = _c === void 0 ? "p" : _c, children = _a.children, _d = _a.className, className = _d === void 0 ? "" : _d, color = _a.color, style = _a.style;
21
+ return (_jsx(Tag, { className: cn("typography-".concat(variant), textVariants({ color: color }), className), style: style, children: children }));
7
22
  });
8
23
  export default Text;
@@ -45,8 +45,12 @@ var variant = [
45
45
  "small1",
46
46
  "small2",
47
47
  "small3",
48
+ "small4",
49
+ "small5",
48
50
  "label1",
49
51
  "label2",
52
+ "buttonL",
53
+ "buttonMS",
50
54
  ];
51
55
  var color = [
52
56
  "primary",
@@ -61,7 +65,7 @@ export var Default = {
61
65
  args: {},
62
66
  render: function (args) {
63
67
  var props = __assign({}, args);
64
- return (_jsx("div", { className: "flex flex-col gap-2 gap-y-6 w-full", children: variant.map(function (value) { return (_jsxs("div", { className: "flex flex-row ", children: [_jsx("div", { className: "w-[200px]", children: _jsx(Text, { variant: value, color: "primary", children: value }) }), _jsx("div", { className: "w-full", children: _jsx(Text, { variant: value, color: "primary", children: "Lorem ipsum dolor sit amet, adipiscing elit." }) })] }, value)); }) }));
68
+ return (_jsx("div", { className: "flex flex-col gap-2 gap-y-6 w-full", children: variant.map(function (value) { return (_jsxs("div", { className: "flex flex-row ", children: [_jsx("div", { className: "w-[200px]", children: _jsx(Text, { variant: value, children: value }) }), _jsx("div", { className: "w-full", children: _jsx(Text, { variant: value, children: "Lorem ipsum dolor sit amet, adipiscing elit." }) })] }, value)); }) }));
65
69
  },
66
70
  };
67
71
  export var Color = {
@@ -22,13 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { forwardRef, useImperativeHandle, useRef, } from "react";
25
- import { helperTextVariant, iconVariant, iconWrapperVariant, inputVariant, labelVariant, sectionIconWrapperVariant, } from "./TextInput.styles";
26
- import { XCircleIcon, ExclamationCircleIcon } from "@heroicons/react/16/solid";
25
+ import { helperTextVariant, iconSearchWrapperVariant, iconVariant, iconWrapperVariant, inputVariant, labelVariant, sectionIconWrapperVariant, } from "./TextInput.styles";
26
+ import { XCircleIcon, ExclamationCircleIcon, MagnifyingGlassIcon, } from "@heroicons/react/16/solid";
27
27
  import { cn } from "@/utils/cn";
28
28
  export var TextInput = forwardRef(function (_a, ref) {
29
- var id = _a.id, label = _a.label, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.rounded, rounded = _c === void 0 ? "normal" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, _e = _a.type, type = _e === void 0 ? "text" : _e, helperText = _a.helperText, errorMessage = _a.errorMessage, _f = _a.fullwidth, fullwidth = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.error, error = _h === void 0 ? false : _h, _j = _a.required, required = _j === void 0 ? true : _j, _k = _a.hasClearIcon, hasClearIcon = _k === void 0 ? true : _k, endIcon = _a.endIcon, labelClassName = _a.labelClassName, props = __rest(_a, ["id", "label", "size", "rounded", "variant", "type", "helperText", "errorMessage", "fullwidth", "disabled", "error", "required", "hasClearIcon", "endIcon", "labelClassName"]);
29
+ var id = _a.id, label = _a.label, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.rounded, rounded = _c === void 0 ? "normal" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, _e = _a.type, type = _e === void 0 ? "text" : _e, helperText = _a.helperText, errorMessage = _a.errorMessage, _f = _a.fullwidth, fullwidth = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.error, error = _h === void 0 ? false : _h, _j = _a.required, required = _j === void 0 ? true : _j, _k = _a.hasClearIcon, hasClearIcon = _k === void 0 ? true : _k, _l = _a.hasSearchIcon, hasSearchIcon = _l === void 0 ? false : _l, startIcon = _a.startIcon, endIcon = _a.endIcon, labelClassName = _a.labelClassName, props = __rest(_a, ["id", "label", "size", "rounded", "variant", "type", "helperText", "errorMessage", "fullwidth", "disabled", "error", "required", "hasClearIcon", "hasSearchIcon", "startIcon", "endIcon", "labelClassName"]);
30
30
  var inputRef = useRef(null);
31
31
  var _id = id || "".concat(type, "-").concat(label, "-input");
32
+ var hasLeftSectionIcon = !!startIcon;
32
33
  var hasRightSectionIcon = !!endIcon;
33
34
  var inputClassname = inputVariant({
34
35
  size: size,
@@ -37,20 +38,26 @@ export var TextInput = forwardRef(function (_a, ref) {
37
38
  fullwidth: fullwidth,
38
39
  disabled: disabled,
39
40
  error: error,
41
+ hasSearchIcon: hasSearchIcon,
40
42
  hasClearIcon: hasRightSectionIcon ? false : hasClearIcon,
43
+ leftSectionIcon: hasLeftSectionIcon,
41
44
  rightSectionIcon: hasRightSectionIcon,
42
45
  });
43
46
  var labelClassname = labelVariant({
44
47
  size: size,
45
48
  disabled: disabled,
46
49
  error: error,
50
+ hasSearchIcon: hasSearchIcon,
47
51
  });
48
52
  var helperTextClassname = helperTextVariant({ size: size, error: error, disabled: disabled });
49
53
  var iconWrapperClassname = iconWrapperVariant({ size: size });
54
+ var iconSearchWrapperClassname = iconSearchWrapperVariant({ size: size });
50
55
  var iconClassname = iconVariant({ size: size });
51
- var sectionIconWrapperClassname = sectionIconWrapperVariant({
56
+ // TODO startIcon
57
+ var endIconWrapperClassname = sectionIconWrapperVariant({
52
58
  size: size,
53
59
  rounded: rounded,
60
+ error: error,
54
61
  });
55
62
  useImperativeHandle(ref, function () { return inputRef === null || inputRef === void 0 ? void 0 : inputRef.current; });
56
63
  var handleClearInput = function () {
@@ -58,6 +65,8 @@ export var TextInput = forwardRef(function (_a, ref) {
58
65
  inputRef.current.value = "";
59
66
  }
60
67
  };
61
- return (_jsxs("div", { className: "inline-flex flex-col ".concat(fullwidth ? "w-full" : ""), children: [_jsxs("div", { className: "relative", children: [_jsx("input", __assign({}, props, { placeholder: " ", ref: inputRef, type: type, id: _id, disabled: disabled, className: cn(inputClassname, props.className) })), hasClearIcon && !hasRightSectionIcon && (_jsx("div", { className: iconWrapperClassname, children: _jsx(XCircleIcon, { type: "button", className: iconClassname, onMouseDown: handleClearInput }) })), hasRightSectionIcon && (_jsx("div", { className: sectionIconWrapperClassname, children: endIcon })), _jsxs("label", { htmlFor: _id, className: cn(labelClassname, labelClassName), children: [label, " ", required && _jsx("span", { className: "text-error", children: "*" })] })] }), (errorMessage || helperText) && (_jsxs("span", { className: helperTextClassname, children: [_jsx(ExclamationCircleIcon, { width: 16, height: 16, className: error ? "fill-error" : "" }), " ", errorMessage || helperText] }))] }));
68
+ return (_jsxs("div", { className: "inline-flex flex-col ".concat(fullwidth ? "w-full" : ""), children: [_jsxs("div", { className: "relative", children: [hasSearchIcon && (_jsx("div", { className: iconSearchWrapperClassname, children: _jsx(MagnifyingGlassIcon, { className: iconClassname }) })), _jsx("input", __assign({}, props, { placeholder: " ", ref: inputRef, type: type, id: _id, disabled: disabled, className: cn(inputClassname, props.className) })), hasClearIcon && !hasRightSectionIcon && (_jsx("div", { className: iconWrapperClassname, children: _jsx(XCircleIcon, { type: "button", className: iconClassname, onMouseDown: handleClearInput }) })), hasRightSectionIcon && (_jsx("div", { className: endIconWrapperClassname, children: endIcon })), _jsxs("label", { htmlFor: _id, className: cn(labelClassname, labelClassName), children: [label, " ", required && (_jsx("span", { className: cn("text-error", {
69
+ "text-input-disable-text": disabled,
70
+ }), children: "*" }))] })] }), (errorMessage || helperText) && (_jsxs("span", { className: helperTextClassname, children: [_jsx(ExclamationCircleIcon, { width: 16, height: 16, className: error ? "fill-error" : "" }), " ", errorMessage || helperText] }))] }));
62
71
  });
63
72
  export default TextInput;
@@ -23,7 +23,7 @@ var meta = {
23
23
  layout: "fullscreen",
24
24
  },
25
25
  decorators: [
26
- function (Story) { return (_jsx("div", { className: "p-5 flex w-full bg-[rgb(var(--other-bg-2))]", children: _jsx(Story, {}) })); },
26
+ function (Story) { return (_jsx("div", { className: "p-5 flex w-full bg-[rgb(var(--base-bg-2))] ", children: _jsx(Story, {}) })); },
27
27
  ],
28
28
  };
29
29
  export default meta;
@@ -63,7 +63,8 @@ export var CustomLabel = {
63
63
  export var FuctionInput = {
64
64
  args: {
65
65
  label: "Placeholder Text",
66
- disabled: false,
66
+ value: "dsdsds",
67
+ disabled: true,
67
68
  },
68
69
  render: function (args) {
69
70
  console.log("args ", args);
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority";
2
2
  export var inputVariant = cva([
3
3
  "border-0 outline-none",
4
4
  "p-1 flex w-auto box-border",
5
- "peer text-black placeholder:text-transparent bg-transparent caret-primary",
5
+ "peer text-input-filled-text placeholder:text-transparent bg-transparent caret-primary",
6
6
  ], {
7
7
  variants: {
8
8
  size: {
@@ -12,26 +12,39 @@ export var inputVariant = cva([
12
12
  },
13
13
  rounded: {
14
14
  none: "rounded-none",
15
- normal: "rounded-xl",
15
+ normal: "rounded-md",
16
16
  full: "rounded-full",
17
17
  },
18
18
  variant: {
19
19
  flat: "",
20
- outline: "ring-1 ring-inset ring-input-stroke hover:ring-input-active focus:ring-1 focus:ring-inset focus:ring-input-stroke-active",
21
- underline: "border-b-2 border-input-stroke transition-colors hover:border-input-stroke-active focus:border-input-stroke",
20
+ outline: [
21
+ "ring-1 ring-inset ring-input-default-stroke",
22
+ "hover:ring-input-active-stroke",
23
+ "focus:ring-1 focus:ring-inset focus:ring-input-active-stroke",
24
+ ],
25
+ underline: "border-b-2 border-input-default-stroke transition-colors hover:border-input-active-stroke focus:border-input-stroke",
22
26
  },
23
27
  fullwidth: {
24
28
  true: "w-full",
25
29
  },
26
30
  disabled: {
27
- true: "text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled",
31
+ true: [
32
+ "bg-input-disable-bg text-input-disable-text ring-input-disable-stroke placeholder:text-input-disable-text",
33
+ "hover:ring-input-disable-stroke",
34
+ ],
28
35
  },
29
36
  error: {
30
- true: "ring-error focus:ring-error",
37
+ true: "ring-input-error focus:ring-input-error",
31
38
  },
32
39
  hasClearIcon: {
33
40
  true: "",
34
41
  },
42
+ hasSearchIcon: {
43
+ false: "",
44
+ },
45
+ leftSectionIcon: {
46
+ false: "",
47
+ },
35
48
  rightSectionIcon: {
36
49
  false: "",
37
50
  },
@@ -56,6 +69,36 @@ export var inputVariant = cva([
56
69
  size: "lg",
57
70
  class: "focus:pe-10",
58
71
  },
72
+ {
73
+ hasSearchIcon: true,
74
+ size: "sm",
75
+ class: "ps-6",
76
+ },
77
+ {
78
+ hasSearchIcon: true,
79
+ size: "md",
80
+ class: "ps-9",
81
+ },
82
+ {
83
+ hasSearchIcon: true,
84
+ size: "lg",
85
+ class: "ps-11",
86
+ },
87
+ {
88
+ leftSectionIcon: true,
89
+ size: "sm",
90
+ class: "ps-[38px]",
91
+ },
92
+ {
93
+ leftSectionIcon: true,
94
+ size: "md",
95
+ class: "ps-[46px]",
96
+ },
97
+ {
98
+ leftSectionIcon: true,
99
+ size: "lg",
100
+ class: "ps-[72px]",
101
+ },
59
102
  {
60
103
  rightSectionIcon: true,
61
104
  size: "sm",
@@ -80,41 +123,77 @@ export var inputVariant = cva([
80
123
  disabled: false,
81
124
  error: false,
82
125
  hasClearIcon: false,
126
+ hasSearchIcon: false,
127
+ leftSectionIcon: false, // TODO function style
83
128
  rightSectionIcon: false,
84
129
  },
85
130
  });
86
131
  export var labelVariant = cva([
87
- "absolute block duration-450 transition-all px-[2px] text-input-text peer-focus:text-input-text-active peer-focus:bg-input-label-background",
132
+ "absolute block duration-450 transition-all px-[2px] text-input-default-text",
133
+ "peer-focus:text-input-filled-text peer-focus:bg-input-label-bg", // TODO bg
88
134
  ], {
89
135
  variants: {
90
136
  size: {
91
137
  sm: [
92
- "left-3 -top-1.5 typography-label2 bg-input-label-background",
138
+ "left-3 -top-1.5 typography-label2 bg-input-label-bg",
93
139
  "peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent",
94
140
  "peer-focus:-top-1.5 peer-focus:typography-label2",
95
141
  ],
96
142
  md: [
97
- "left-3 -top-1.5 typography-label1 bg-input-label-background",
143
+ "left-3 -top-1.5 typography-label1 bg-input-label-bg",
98
144
  "peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitile4 peer-placeholder-shown:bg-transparent",
99
145
  "peer-focus:-top-1.5 peer-focus:typography-label1",
100
146
  ],
101
147
  lg: [
102
- "left-4 -top-1.5 typography-label1 bg-input-label-background",
148
+ "left-4 -top-1.5 typography-label1 bg-input-label-bg",
103
149
  "peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitile1 peer-placeholder-shown:bg-transparent",
104
150
  "peer-focus:-top-1.5 peer-focus:typography-label1",
105
151
  ],
106
152
  },
107
153
  disabled: {
108
- true: "text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled",
154
+ true: "text-input-default-text placeholder:text-input-default-text",
109
155
  },
110
156
  error: {
111
157
  true: "ring-error",
112
158
  },
159
+ hasSearchIcon: {
160
+ false: "",
161
+ },
113
162
  },
163
+ compoundVariants: [
164
+ {
165
+ hasSearchIcon: true,
166
+ size: "sm",
167
+ className: [
168
+ "left-6 -top-1.5 typography-label2 bg-input-label-bg",
169
+ "peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent",
170
+ "peer-focus:-top-1.5 peer-focus:typography-label2",
171
+ ],
172
+ },
173
+ {
174
+ hasSearchIcon: true,
175
+ size: "md",
176
+ className: [
177
+ "left-9 -top-1.5 typography-label1 bg-input-label-bg",
178
+ "peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitile4 peer-placeholder-shown:bg-transparent",
179
+ "peer-focus:-top-1.5 peer-focus:typography-label1",
180
+ ],
181
+ },
182
+ {
183
+ hasSearchIcon: true,
184
+ size: "lg",
185
+ className: [
186
+ "left-11 -top-1.5 typography-label1 bg-input-label-bg",
187
+ "peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitile1 peer-placeholder-shown:bg-transparent",
188
+ "peer-focus:-top-1.5 peer-focus:typography-label1",
189
+ ],
190
+ },
191
+ ],
114
192
  defaultVariants: {
115
193
  size: "md",
116
194
  disabled: false,
117
195
  error: false,
196
+ hasSearchIcon: false,
118
197
  },
119
198
  });
120
199
  export var helperTextVariant = cva(["text-small1 flex flex-row items-center gap-1"], {
@@ -125,11 +204,11 @@ export var helperTextVariant = cva(["text-small1 flex flex-row items-center gap-
125
204
  lg: "mt-[6px]",
126
205
  },
127
206
  disabled: {
128
- true: "text-input-text-disabled",
207
+ true: "text-input-disable-text",
129
208
  },
130
209
  error: {
131
- true: "text-error",
132
- false: "text-input-text",
210
+ true: "text-input-error",
211
+ false: "text-input-filled-text",
133
212
  },
134
213
  },
135
214
  defaultVariants: {
@@ -152,7 +231,21 @@ export var iconWrapperVariant = cva([
152
231
  size: "md",
153
232
  },
154
233
  });
155
- export var iconVariant = cva(["cursor-pointer z-50 fill-input-stroke-active hover:fill-input-text"], {
234
+ export var iconSearchWrapperVariant = cva(["absolute inset-y-0 left-0 items-center justify-center flex"], {
235
+ variants: {
236
+ size: {
237
+ sm: "ml-2",
238
+ md: "ml-3",
239
+ lg: "ml-4",
240
+ },
241
+ },
242
+ defaultVariants: {
243
+ size: "md",
244
+ },
245
+ });
246
+ export var iconVariant = cva([
247
+ "cursor-pointer z-50 fill-input-active-stroke hover:fill-input-default-text",
248
+ ], {
156
249
  variants: {
157
250
  size: {
158
251
  sm: "size-3",
@@ -165,9 +258,9 @@ export var iconVariant = cva(["cursor-pointer z-50 fill-input-stroke-active hove
165
258
  },
166
259
  });
167
260
  export var sectionIconWrapperVariant = cva([
168
- "absolute inset-y-0 right-0 items-center justify-center flex",
169
- "border-l border-l-input-stroke peer-hover:border-l-input-active peer-focus:border-l-input-stroke-active peer-disabled:border-l-input-stroke-disabled",
170
- "fill-input-text peer-hover:fill-input-text-active peer-focus:fill-input-text-active",
261
+ "absolute items-center justify-center flex",
262
+ "border-l border-l-input-default-stroke peer-hover:border-l-input-active-stroke peer-focus:border-l-input-active-stroke peer-disabled:border-l-input-disable-stroke",
263
+ "fill-input-default-text peer-hover:fill-input-filled-text peer-focus:fill-input-filled-text peer-disabled:fill-input-disable-stroke",
171
264
  ], {
172
265
  variants: {
173
266
  size: {
@@ -180,9 +273,18 @@ export var sectionIconWrapperVariant = cva([
180
273
  normal: "rounded-r-xl",
181
274
  full: "rounded-r-full",
182
275
  },
276
+ error: {
277
+ true: "border-l-input-error",
278
+ },
279
+ position: {
280
+ start: "inset-y-0 left-0 ",
281
+ end: "inset-y-0 right-0 ",
282
+ },
183
283
  },
184
284
  defaultVariants: {
185
285
  size: "md",
186
286
  rounded: "normal",
287
+ error: false,
288
+ position: "end",
187
289
  },
188
290
  });