@nattstack/ui 0.0.54 → 0.0.56
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/components/index.d.ts +1 -0
- package/dist/components/index.js +32 -22
- package/dist/components/style.css +11 -3
- package/package.json +5 -5
|
@@ -392,6 +392,7 @@ declare const TEXTAREA_CLASS_NAME: {
|
|
|
392
392
|
//#region src/components/tooltip/tooltip.d.ts
|
|
393
393
|
interface TooltipProps extends Omit<Tooltip$1.Root.Props, "disabled"> {
|
|
394
394
|
isDisabled?: Tooltip$1.Root.Props["disabled"];
|
|
395
|
+
isDisableHoverablePopup?: Tooltip$1.Root.Props["disableHoverablePopup"];
|
|
395
396
|
}
|
|
396
397
|
declare function Tooltip(props: TooltipProps): JSX.Element;
|
|
397
398
|
//#endregion
|
package/dist/components/index.js
CHANGED
|
@@ -22,7 +22,8 @@ var button_spinner_module_default = {
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/components/button/button-spinner.tsx
|
|
24
24
|
function ButtonSpinner(props) {
|
|
25
|
-
const
|
|
25
|
+
const DEFAULT_SIZE = 20;
|
|
26
|
+
const { size = DEFAULT_SIZE } = props;
|
|
26
27
|
return /* @__PURE__ */ jsx("div", {
|
|
27
28
|
className: button_spinner_module_default.button_spinner,
|
|
28
29
|
style: { "--size": `${size}px` },
|
|
@@ -50,7 +51,8 @@ var button_module_default = {
|
|
|
50
51
|
//#endregion
|
|
51
52
|
//#region src/components/button/button.tsx
|
|
52
53
|
function Button(props) {
|
|
53
|
-
const
|
|
54
|
+
const DEFAULT_SIZE = 40;
|
|
55
|
+
const { children = "", className: customClassName = "", iconEnd = "", iconStart = "", isActive = false, isDisabled = false, isFullWidth = false, isIconOnly = false, isLoading = false, isRounded = false, size = DEFAULT_SIZE, type = "button", variant = "primary", ...rest } = props;
|
|
54
56
|
return /* @__PURE__ */ jsxs("button", {
|
|
55
57
|
"aria-pressed": isActive,
|
|
56
58
|
className: normalizeWhitespace(`
|
|
@@ -100,7 +102,8 @@ const BUTTON_CLASS_NAME = {
|
|
|
100
102
|
//#endregion
|
|
101
103
|
//#region src/components/button-link/button-link.tsx
|
|
102
104
|
function ButtonLink(props) {
|
|
103
|
-
const
|
|
105
|
+
const DEFAULT_SIZE = 40;
|
|
106
|
+
const { as = "a", className: customClassName = "", isFullWidth = false, isIconOnly = false, isRounded = false, size = DEFAULT_SIZE, variant = "primary", ...rest } = props;
|
|
104
107
|
return createElement(as, {
|
|
105
108
|
className: normalizeWhitespace(`
|
|
106
109
|
${BUTTON_CLASS_NAME.BASE}
|
|
@@ -265,7 +268,8 @@ var input_module_default = {
|
|
|
265
268
|
//#endregion
|
|
266
269
|
//#region src/components/input/input.tsx
|
|
267
270
|
function Input(props) {
|
|
268
|
-
const
|
|
271
|
+
const DEFAULT_SIZE = 48;
|
|
272
|
+
const { className: customClassName = "", isActive = false, isDisabled = false, isInvalid = void 0, isReadOnly = false, isRequired = false, isRounded = false, isValid = void 0, size = DEFAULT_SIZE, type = "text", ...rest } = props;
|
|
269
273
|
return /* @__PURE__ */ jsx("input", {
|
|
270
274
|
className: normalizeWhitespace(`
|
|
271
275
|
${INPUT_CLASS_NAME.BASE}
|
|
@@ -422,7 +426,8 @@ function MenuCheckboxItem(props) {
|
|
|
422
426
|
//#endregion
|
|
423
427
|
//#region src/components/menu/menu-content.tsx
|
|
424
428
|
function MenuContent(props) {
|
|
425
|
-
const
|
|
429
|
+
const DEFAULT_SIDE_OFFSET = 8;
|
|
430
|
+
const { align = "start", alignOffset = void 0, anchor = void 0, arrowPadding = void 0, children, className: customClassName = "", collisionAvoidance = void 0, collisionBoundary = void 0, collisionPadding = void 0, container = void 0, disableAnchorTracking = void 0, keepMounted = void 0, positionMethod = void 0, side = "bottom", sideOffset = DEFAULT_SIDE_OFFSET, sticky = void 0, ...rest } = props;
|
|
426
431
|
const combinedClassName = getMenuClassName(MENU_CLASS_NAME.CONTENT, customClassName);
|
|
427
432
|
return /* @__PURE__ */ jsx(Menu$1.Portal, {
|
|
428
433
|
container,
|
|
@@ -700,7 +705,8 @@ var switch_module_default = {
|
|
|
700
705
|
//#endregion
|
|
701
706
|
//#region src/components/switch/switch.tsx
|
|
702
707
|
function Switch(props) {
|
|
703
|
-
const
|
|
708
|
+
const DEFAULT_SIZE = 24;
|
|
709
|
+
const { className: customClassName = "", isChecked = void 0, isDefaultChecked = false, isDisabled = false, isReadOnly = false, isRequired = false, size = DEFAULT_SIZE, ...rest } = props;
|
|
704
710
|
const combinedClassName = normalizeWhitespace(`
|
|
705
711
|
${SWITCH_CLASS_NAME.BASE}
|
|
706
712
|
${SWITCH_CLASS_NAME.SIZE[size]}
|
|
@@ -948,7 +954,8 @@ var textarea_module_default = { "textarea": "textarea-module_textarea_JqpxFq" };
|
|
|
948
954
|
//#endregion
|
|
949
955
|
//#region src/components/textarea/textarea.tsx
|
|
950
956
|
function Textarea(props) {
|
|
951
|
-
const
|
|
957
|
+
const DEFAULT_ROWS = 2;
|
|
958
|
+
const { className: customClassName = "", isActive = false, isDisabled = false, isInvalid = void 0, isReadOnly = false, isRequired = false, isRounded = false, isValid = void 0, rows = DEFAULT_ROWS, ...rest } = props;
|
|
952
959
|
return /* @__PURE__ */ jsx("textarea", {
|
|
953
960
|
className: normalizeWhitespace(`
|
|
954
961
|
${TEXTAREA_CLASS_NAME.INPUT}
|
|
@@ -977,11 +984,11 @@ const TEXTAREA_CLASS_NAME = {
|
|
|
977
984
|
//#endregion
|
|
978
985
|
//#region src/components/tooltip/tooltip.tsx
|
|
979
986
|
function Tooltip(props) {
|
|
980
|
-
const { isDisabled = false, ...rest } = props;
|
|
987
|
+
const { isDisabled = false, isDisableHoverablePopup = true, ...rest } = props;
|
|
981
988
|
return /* @__PURE__ */ jsx(Tooltip$1.Root, {
|
|
982
989
|
"data-slot": "tooltip",
|
|
983
990
|
disabled: isDisabled,
|
|
984
|
-
disableHoverablePopup:
|
|
991
|
+
disableHoverablePopup: isDisableHoverablePopup,
|
|
985
992
|
...rest
|
|
986
993
|
});
|
|
987
994
|
}
|
|
@@ -989,27 +996,30 @@ function Tooltip(props) {
|
|
|
989
996
|
//#region src/components/tooltip/tooltip-content.module.css
|
|
990
997
|
var tooltip_content_module_default = {
|
|
991
998
|
"tooltip_content": "tooltip-content-module_tooltip_content_j-Z8kW",
|
|
992
|
-
"
|
|
999
|
+
"tooltip_content_portal": "tooltip-content-module_tooltip_content_portal_j-Z8kW"
|
|
993
1000
|
};
|
|
994
1001
|
//#endregion
|
|
995
1002
|
//#region src/components/tooltip/tooltip-content.tsx
|
|
996
1003
|
function TooltipContent(props) {
|
|
997
|
-
const
|
|
1004
|
+
const DEFAULT_SIDE_OFFSET = 4;
|
|
1005
|
+
const { children = "", className: customClassName = "", side = "top", sideOffset = DEFAULT_SIDE_OFFSET, ...rest } = props;
|
|
998
1006
|
const combinedClassName = normalizeWhitespace(`
|
|
999
1007
|
${TOOLTIP_CONTENT_CLASS_NAME.BASE}
|
|
1000
1008
|
${customClassName}
|
|
1001
1009
|
`);
|
|
1002
|
-
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
1003
|
-
className: tooltip_content_module_default.
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1010
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
1011
|
+
className: tooltip_content_module_default.tooltip_content_portal,
|
|
1012
|
+
children: /* @__PURE__ */ jsxs(Tooltip$1.Positioner, {
|
|
1013
|
+
side,
|
|
1014
|
+
sideOffset,
|
|
1015
|
+
children: [/* @__PURE__ */ jsx(Tooltip$1.Popup, {
|
|
1016
|
+
className: combinedClassName,
|
|
1017
|
+
"data-slot": "tooltip-content",
|
|
1018
|
+
...rest,
|
|
1019
|
+
children
|
|
1020
|
+
}), /* @__PURE__ */ jsx(Tooltip$1.Arrow, {})]
|
|
1021
|
+
})
|
|
1022
|
+
});
|
|
1013
1023
|
}
|
|
1014
1024
|
const TOOLTIP_CONTENT_CLASS_NAME = { BASE: tooltip_content_module_default.tooltip_content };
|
|
1015
1025
|
//#endregion
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
}
|
|
350
350
|
.input-module_input_dWvcHW {
|
|
351
351
|
appearance: none;
|
|
352
|
-
background-color: var(--color-bg-
|
|
352
|
+
background-color: var(--color-bg-shell-inner);
|
|
353
353
|
box-shadow: 0 0 0 1px var(--color-border) inset;
|
|
354
354
|
color: var(--color-text-primary);
|
|
355
355
|
cursor: text;
|
|
@@ -956,19 +956,27 @@
|
|
|
956
956
|
padding: 12px !important;
|
|
957
957
|
}
|
|
958
958
|
.tooltip-content-module_tooltip_content_j-Z8kW {
|
|
959
|
+
--scale: .975;
|
|
959
960
|
background-color: var(--color-gray-dark-1);
|
|
960
961
|
color: var(--color-gray-dark-12);
|
|
962
|
+
transform-origin: var(--transform-origin);
|
|
961
963
|
border-radius: 8px;
|
|
962
964
|
padding: 4px 8px;
|
|
963
965
|
font-size: 13px;
|
|
964
966
|
font-weight: 500;
|
|
967
|
+
transition-property: opacity, scale, translate;
|
|
968
|
+
transition-duration: .15s;
|
|
965
969
|
}
|
|
966
970
|
|
|
967
|
-
.tooltip-content-
|
|
968
|
-
isolation: isolate;
|
|
971
|
+
.tooltip-content-module_tooltip_content_portal_j-Z8kW {
|
|
969
972
|
z-index: 50;
|
|
970
973
|
}
|
|
971
974
|
|
|
975
|
+
.tooltip-content-module_tooltip_content_j-Z8kW[data-ending-style], .tooltip-content-module_tooltip_content_j-Z8kW[data-starting-style] {
|
|
976
|
+
opacity: 0;
|
|
977
|
+
scale: var(--scale);
|
|
978
|
+
}
|
|
979
|
+
|
|
972
980
|
.dark .tooltip-content-module_tooltip_content_j-Z8kW {
|
|
973
981
|
background-color: var(--color-gray-light-1);
|
|
974
982
|
color: var(--color-gray-light-12);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nattstack/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
4
4
|
"description": "A collection of reusable React components built with Base UI, TypeScript, and CSS Modules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"base-ui",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"release": "bun publish"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@base-ui/react": "1.4.
|
|
48
|
+
"@base-ui/react": "1.4.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@tsdown/css": "0.21.
|
|
52
|
-
"@types/bun": "1.3.
|
|
53
|
-
"tsdown": "0.21.
|
|
51
|
+
"@tsdown/css": "0.21.10",
|
|
52
|
+
"@types/bun": "1.3.13",
|
|
53
|
+
"tsdown": "0.21.10",
|
|
54
54
|
"typescript": "6.0.3"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|