@ctlyst.id/voila-ui 3.0.0 → 4.0.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.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +24 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, FC, ElementType, ButtonHTMLAttributes, ComponentPropsWithoutRef, ReactNode, MouseEventHandler, InputHTMLAttributes, TextareaHTMLAttributes,
|
|
2
|
+
import { HTMLAttributes, FC, ElementType, ButtonHTMLAttributes, ComponentPropsWithoutRef, ReactNode, MouseEventHandler, InputHTMLAttributes, TextareaHTMLAttributes, ImgHTMLAttributes, ReactElement, AnchorHTMLAttributes, LiHTMLAttributes, PropsWithChildren, CSSProperties, SVGProps, RefObject } from 'react';
|
|
3
3
|
import { AccordionSingleProps, AccordionMultipleProps, AccordionContentProps, AccordionItemProps, AccordionTriggerProps } from '@radix-ui/react-accordion';
|
|
4
4
|
import { AspectRatioProps as AspectRatioProps$1 } from '@radix-ui/react-aspect-ratio';
|
|
5
5
|
import * as Select$1 from '@radix-ui/react-select';
|
|
@@ -11,7 +11,7 @@ import { RecipeVariants } from '@vanilla-extract/recipes';
|
|
|
11
11
|
import { PortalProps } from '@radix-ui/react-portal';
|
|
12
12
|
import { ClassValue } from 'clsx';
|
|
13
13
|
import { RiveProps } from '@rive-app/react-canvas/dist/types/components/Rive';
|
|
14
|
-
import {
|
|
14
|
+
import { DialogProps as DialogProps$1, DialogContentProps } from '@radix-ui/react-dialog';
|
|
15
15
|
import { RadioGroupItemProps, RadioGroupProps } from '@radix-ui/react-radio-group';
|
|
16
16
|
import { SwitchProps as SwitchProps$1 } from '@radix-ui/react-switch';
|
|
17
17
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, FC, ElementType, ButtonHTMLAttributes, ComponentPropsWithoutRef, ReactNode, MouseEventHandler, InputHTMLAttributes, TextareaHTMLAttributes,
|
|
2
|
+
import { HTMLAttributes, FC, ElementType, ButtonHTMLAttributes, ComponentPropsWithoutRef, ReactNode, MouseEventHandler, InputHTMLAttributes, TextareaHTMLAttributes, ImgHTMLAttributes, ReactElement, AnchorHTMLAttributes, LiHTMLAttributes, PropsWithChildren, CSSProperties, SVGProps, RefObject } from 'react';
|
|
3
3
|
import { AccordionSingleProps, AccordionMultipleProps, AccordionContentProps, AccordionItemProps, AccordionTriggerProps } from '@radix-ui/react-accordion';
|
|
4
4
|
import { AspectRatioProps as AspectRatioProps$1 } from '@radix-ui/react-aspect-ratio';
|
|
5
5
|
import * as Select$1 from '@radix-ui/react-select';
|
|
@@ -11,7 +11,7 @@ import { RecipeVariants } from '@vanilla-extract/recipes';
|
|
|
11
11
|
import { PortalProps } from '@radix-ui/react-portal';
|
|
12
12
|
import { ClassValue } from 'clsx';
|
|
13
13
|
import { RiveProps } from '@rive-app/react-canvas/dist/types/components/Rive';
|
|
14
|
-
import {
|
|
14
|
+
import { DialogProps as DialogProps$1, DialogContentProps } from '@radix-ui/react-dialog';
|
|
15
15
|
import { RadioGroupItemProps, RadioGroupProps } from '@radix-ui/react-radio-group';
|
|
16
16
|
import { SwitchProps as SwitchProps$1 } from '@radix-ui/react-switch';
|
|
17
17
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
package/dist/index.js
CHANGED
|
@@ -873,12 +873,12 @@ var import_react_spring3 = require("react-spring");
|
|
|
873
873
|
var import_react_use_gesture = require("react-use-gesture");
|
|
874
874
|
|
|
875
875
|
// src/components/bottom-sheet/bottom-sheet.header.tsx
|
|
876
|
-
var
|
|
876
|
+
var import_icons4 = require("@ctlyst.id/icons");
|
|
877
877
|
var import_voila_ui_core8 = require("@ctlyst.id/voila-ui-core");
|
|
878
878
|
var import_react18 = require("react");
|
|
879
879
|
|
|
880
880
|
// src/components/close-button/close-button.tsx
|
|
881
|
-
var
|
|
881
|
+
var import_v2 = require("@ctlyst.id/icons/src/icons/v2");
|
|
882
882
|
var import_voila_ui_core7 = require("@ctlyst.id/voila-ui-core");
|
|
883
883
|
var import_clsx16 = __toESM(require("clsx"));
|
|
884
884
|
var import_react17 = require("react");
|
|
@@ -904,7 +904,7 @@ var CloseButton = (0, import_react17.forwardRef)(
|
|
|
904
904
|
disabled: isDisabled,
|
|
905
905
|
style,
|
|
906
906
|
...props,
|
|
907
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(box_default, { display: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
907
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(box_default, { display: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_v2.Close, { size: iconSize, color: isDisabled ? import_voila_ui_core7.theme.colors.grey1 : import_voila_ui_core7.theme.colors.black }) })
|
|
908
908
|
}
|
|
909
909
|
);
|
|
910
910
|
}
|
|
@@ -937,7 +937,7 @@ var BottomSheetHeader = (0, import_react18.forwardRef)(
|
|
|
937
937
|
header || /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(flex_default, { alignItems: "center", justifyContent: "space-between", pt: hasHandleBar ? "$16" : "$8", pb: "$8", gap: "$16", children: [
|
|
938
938
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(flex_default, { alignItems: "center", gap: "$16", children: [
|
|
939
939
|
showBack && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
940
|
-
|
|
940
|
+
import_icons4.IconChevronLeft,
|
|
941
941
|
{
|
|
942
942
|
cursor: "pointer",
|
|
943
943
|
onClick: onBack,
|
|
@@ -2593,7 +2593,7 @@ Button.defaultProps = {
|
|
|
2593
2593
|
var button_default = Button;
|
|
2594
2594
|
|
|
2595
2595
|
// src/components/checkbox/checkbox.tsx
|
|
2596
|
-
var
|
|
2596
|
+
var import_v22 = require("@ctlyst.id/icons/src/icons/v2");
|
|
2597
2597
|
var import_react_checkbox = require("@radix-ui/react-checkbox");
|
|
2598
2598
|
var import_react33 = require("react");
|
|
2599
2599
|
|
|
@@ -2645,8 +2645,8 @@ var Checkbox = (0, import_react33.forwardRef)(
|
|
|
2645
2645
|
},
|
|
2646
2646
|
...props,
|
|
2647
2647
|
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_checkbox.Indicator, { className: checkboxIndicator, children: [
|
|
2648
|
-
checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2649
|
-
checked === true && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2648
|
+
checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_v22.Minus, { color: "white", className: checkboxIcon }),
|
|
2649
|
+
checked === true && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_v22.Check, { color: "white", className: checkboxIcon })
|
|
2650
2650
|
] })
|
|
2651
2651
|
}
|
|
2652
2652
|
),
|
|
@@ -3056,7 +3056,7 @@ Divider.displayName = "Divider";
|
|
|
3056
3056
|
var divider_default = Divider;
|
|
3057
3057
|
|
|
3058
3058
|
// src/components/form/input.tsx
|
|
3059
|
-
var
|
|
3059
|
+
var import_v23 = require("@ctlyst.id/icons/src/icons/v2");
|
|
3060
3060
|
var import_voila_ui_core11 = require("@ctlyst.id/voila-ui-core");
|
|
3061
3061
|
var import_clsx23 = __toESM(require("clsx"));
|
|
3062
3062
|
var import_react46 = require("react");
|
|
@@ -3224,7 +3224,7 @@ var Input = (0, import_react46.forwardRef)(
|
|
|
3224
3224
|
className: (0, import_clsx23.default)(isClearable && !isLoading && !hasIcon && clearStyle),
|
|
3225
3225
|
children: [
|
|
3226
3226
|
hasIcon && !isLoading && icon,
|
|
3227
|
-
isClearable && !isLoading && !hasIcon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3227
|
+
isClearable && !isLoading && !hasIcon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_v23.Close, { size: 24, "data-test-id": `clear-input-${props["data-test-id"]}`, onClick: onClear }),
|
|
3228
3228
|
isLoading && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(spinner_default, { color: import_voila_ui_core11.theme.colors.green1 })
|
|
3229
3229
|
]
|
|
3230
3230
|
}
|
|
@@ -4538,7 +4538,7 @@ SelectList.defaultProps = {
|
|
|
4538
4538
|
var select_list_default = SelectList;
|
|
4539
4539
|
|
|
4540
4540
|
// src/components/select/select-list-item.tsx
|
|
4541
|
-
var
|
|
4541
|
+
var import_icons5 = require("@ctlyst.id/icons");
|
|
4542
4542
|
var import_voila_ui_core12 = require("@ctlyst.id/voila-ui-core");
|
|
4543
4543
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4544
4544
|
var SelectListItem = ({ renderer, item, itemIndex }) => {
|
|
@@ -4582,7 +4582,7 @@ var SelectListItem = ({ renderer, item, itemIndex }) => {
|
|
|
4582
4582
|
...listItemProps,
|
|
4583
4583
|
children: [
|
|
4584
4584
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: item.label }),
|
|
4585
|
-
isMulti && multipleSelectedItems.includes(item) && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4585
|
+
isMulti && multipleSelectedItems.includes(item) && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_icons5.IconCheck, { size: 16, color: import_voila_ui_core12.theme.colors.greenAccent1, "data-test-id": "" })
|
|
4586
4586
|
]
|
|
4587
4587
|
},
|
|
4588
4588
|
item.value
|
|
@@ -4594,7 +4594,7 @@ SelectListItem.defaultProps = {
|
|
|
4594
4594
|
var select_list_item_default = SelectListItem;
|
|
4595
4595
|
|
|
4596
4596
|
// src/components/select/select-toggle.tsx
|
|
4597
|
-
var
|
|
4597
|
+
var import_v24 = require("@ctlyst.id/icons/src/icons/v2");
|
|
4598
4598
|
var import_voila_ui_core13 = require("@ctlyst.id/voila-ui-core");
|
|
4599
4599
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
4600
4600
|
var SelectToggle = ({ renderer, ...rest }) => {
|
|
@@ -4607,7 +4607,7 @@ var SelectToggle = ({ renderer, ...rest }) => {
|
|
|
4607
4607
|
});
|
|
4608
4608
|
}
|
|
4609
4609
|
const iconColor = import_voila_ui_core13.theme.colors.grey1;
|
|
4610
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: toggleStyle, "data-test-id": rest["data-test-id"], "data-disabled": disabled, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
4610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: toggleStyle, "data-test-id": rest["data-test-id"], "data-disabled": disabled, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_v24.ChevronUp, { color: iconColor, size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_v24.ChevronDown, { color: iconColor, size: 24 }) });
|
|
4611
4611
|
};
|
|
4612
4612
|
SelectToggle.defaultProps = {
|
|
4613
4613
|
renderer: void 0,
|
|
@@ -5183,7 +5183,8 @@ var RadioGroupDefault = ({ className, children, ...props }) => {
|
|
|
5183
5183
|
var radio_group_default = RadioGroupDefault;
|
|
5184
5184
|
|
|
5185
5185
|
// src/components/search/search.tsx
|
|
5186
|
-
var
|
|
5186
|
+
var import_icons6 = require("@ctlyst.id/icons");
|
|
5187
|
+
var import_v25 = require("@ctlyst.id/icons/src/icons/v2");
|
|
5187
5188
|
var import_clsx37 = __toESM(require("clsx"));
|
|
5188
5189
|
var import_react63 = require("react");
|
|
5189
5190
|
|
|
@@ -5226,7 +5227,7 @@ var Search = (0, import_react63.forwardRef)(
|
|
|
5226
5227
|
};
|
|
5227
5228
|
const isHasIcon = (0, import_react63.useMemo)(() => !!(withIcon && (icon || value && isFocused)), [withIcon, isFocused, value, icon]);
|
|
5228
5229
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(box_default, { className: container, children: [
|
|
5229
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(box_default, { className: (0, import_clsx37.default)(leftIconContainer), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5230
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(box_default, { className: (0, import_clsx37.default)(leftIconContainer), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_icons6.IconSearch, { size: 24 }) }),
|
|
5230
5231
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5231
5232
|
"input",
|
|
5232
5233
|
{
|
|
@@ -5240,7 +5241,7 @@ var Search = (0, import_react63.forwardRef)(
|
|
|
5240
5241
|
...props
|
|
5241
5242
|
}
|
|
5242
5243
|
),
|
|
5243
|
-
isHasIcon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(box_default, { className: (0, import_clsx37.default)(rightIconContainer), children: icon && (!isFocused || isFocused && !value) ? icon : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(box_default, { className: (0, import_clsx37.default)(closeIconContainer), onMouseDown: onClear, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5244
|
+
isHasIcon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(box_default, { className: (0, import_clsx37.default)(rightIconContainer), children: icon && (!isFocused || isFocused && !value) ? icon : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(box_default, { className: (0, import_clsx37.default)(closeIconContainer), onMouseDown: onClear, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_v25.Close, { "data-test-id": "icon-close-search", onMouseDown: onClear, cursor: "pointer", size: 24 }) }) })
|
|
5244
5245
|
] });
|
|
5245
5246
|
}
|
|
5246
5247
|
);
|
|
@@ -5255,7 +5256,7 @@ Search.defaultProps = {
|
|
|
5255
5256
|
var search_default = Search;
|
|
5256
5257
|
|
|
5257
5258
|
// src/components/switch/switch.tsx
|
|
5258
|
-
var
|
|
5259
|
+
var import_icons7 = require("@ctlyst.id/icons");
|
|
5259
5260
|
var import_react_switch = require("@radix-ui/react-switch");
|
|
5260
5261
|
var import_clsx38 = __toESM(require("clsx"));
|
|
5261
5262
|
var import_react64 = require("react");
|
|
@@ -5292,7 +5293,7 @@ var Switch = (0, import_react64.forwardRef)((props, ref) => {
|
|
|
5292
5293
|
variant: size
|
|
5293
5294
|
})
|
|
5294
5295
|
),
|
|
5295
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_icons7.IconCheck, { className: checkThumb, size: ICON_SIZE[size] })
|
|
5296
5297
|
}
|
|
5297
5298
|
)
|
|
5298
5299
|
}
|
|
@@ -5307,7 +5308,7 @@ Switch.defaultProps = {
|
|
|
5307
5308
|
var import_react66 = require("react");
|
|
5308
5309
|
|
|
5309
5310
|
// src/components/table/sort-button.tsx
|
|
5310
|
-
var
|
|
5311
|
+
var import_icons8 = require("@ctlyst.id/icons");
|
|
5311
5312
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5312
5313
|
var SortButton = ({ accessor, sortColumn, sortable, "data-test-id": testId }) => {
|
|
5313
5314
|
const isActiveSort = sortColumn.by === accessor;
|
|
@@ -5315,8 +5316,8 @@ var SortButton = ({ accessor, sortColumn, sortable, "data-test-id": testId }) =>
|
|
|
5315
5316
|
const isAscendant = sortColumn.order === "ASC";
|
|
5316
5317
|
if (!sortable) return null;
|
|
5317
5318
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(flex_default, { flexDirection: "column", "data-test-id": testId, children: [
|
|
5318
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5319
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5319
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_icons8.IconChevronUp, { size: 10, color: isActiveSort && isDescendant ? "white" : "grey" }),
|
|
5320
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_icons8.IconChevronDown, { size: 10, color: isActiveSort && isAscendant ? "white" : "grey" })
|
|
5320
5321
|
] });
|
|
5321
5322
|
};
|
|
5322
5323
|
SortButton.defaultProps = {
|
|
@@ -5868,7 +5869,7 @@ Toaster.displayName = "Toaster";
|
|
|
5868
5869
|
var toaster_default = Toaster;
|
|
5869
5870
|
|
|
5870
5871
|
// src/components/tooltip/tooltip.tsx
|
|
5871
|
-
var
|
|
5872
|
+
var import_icons9 = require("@ctlyst.id/icons");
|
|
5872
5873
|
var import_voila_ui_core14 = require("@ctlyst.id/voila-ui-core");
|
|
5873
5874
|
var RadixTooltip = __toESM(require("@radix-ui/react-tooltip"));
|
|
5874
5875
|
var import_dynamic = require("@vanilla-extract/dynamic");
|
|
@@ -5930,7 +5931,7 @@ var Tooltip = (0, import_react72.forwardRef)(
|
|
|
5930
5931
|
className: (0, import_clsx43.default)(tooltipContentStyle, commonClass, borderClass),
|
|
5931
5932
|
children: [
|
|
5932
5933
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(flex_default, { gap: "$6", children: [
|
|
5933
|
-
withIcon && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(flex_default, { width: "$24", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
5934
|
+
withIcon && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(flex_default, { width: "$24", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons9.IconHelpSolid, { size: 24 }) }),
|
|
5934
5935
|
content
|
|
5935
5936
|
] }),
|
|
5936
5937
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|