@noya-app/noya-designsystem 0.1.22 → 0.1.23
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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Button.tsx +2 -2
- package/src/components/InputField.tsx +11 -1
- package/src/components/ListView.tsx +18 -1
- package/src/components/Select.tsx +1 -1
package/package.json
CHANGED
|
@@ -57,10 +57,10 @@ export const ButtonElement = styled.button<{
|
|
|
57
57
|
borderRadius: "4px",
|
|
58
58
|
paddingTop: $variant === "none" ? "0px" : "4px",
|
|
59
59
|
paddingRight:
|
|
60
|
-
$variant === "none" ? "0px" : $variant === "thin" ? "1px" : "
|
|
60
|
+
$variant === "none" ? "0px" : $variant === "thin" ? "1px" : "6px",
|
|
61
61
|
paddingBottom: $variant === "none" ? "0px" : "4px",
|
|
62
62
|
paddingLeft:
|
|
63
|
-
$variant === "none" ? "0px" : $variant === "thin" ? "1px" : "
|
|
63
|
+
$variant === "none" ? "0px" : $variant === "thin" ? "1px" : "6px",
|
|
64
64
|
...($size === "large" && {
|
|
65
65
|
paddingTop: "12px",
|
|
66
66
|
paddingRight: "16px",
|
|
@@ -543,6 +543,8 @@ interface InputFieldRootProps {
|
|
|
543
543
|
size?: InputFieldSize;
|
|
544
544
|
renderPopoverContent?: (options: { width: number }) => ReactNode;
|
|
545
545
|
onFocusChange?: (isFocused: boolean) => void;
|
|
546
|
+
style?: React.CSSProperties;
|
|
547
|
+
className?: string;
|
|
546
548
|
}
|
|
547
549
|
|
|
548
550
|
function InputFieldRoot({
|
|
@@ -555,6 +557,8 @@ function InputFieldRoot({
|
|
|
555
557
|
size = "medium",
|
|
556
558
|
renderPopoverContent,
|
|
557
559
|
onFocusChange,
|
|
560
|
+
style,
|
|
561
|
+
className,
|
|
558
562
|
}: InputFieldRootProps) {
|
|
559
563
|
const childrenArray = Children.toArray(children);
|
|
560
564
|
|
|
@@ -617,7 +621,13 @@ function InputFieldRoot({
|
|
|
617
621
|
);
|
|
618
622
|
|
|
619
623
|
const rootElement = (
|
|
620
|
-
<RootContainer
|
|
624
|
+
<RootContainer
|
|
625
|
+
id={id}
|
|
626
|
+
$width={width}
|
|
627
|
+
$flex={flex}
|
|
628
|
+
style={style}
|
|
629
|
+
className={className}
|
|
630
|
+
>
|
|
621
631
|
{children}
|
|
622
632
|
</RootContainer>
|
|
623
633
|
);
|
|
@@ -333,6 +333,13 @@ interface ListViewRowProps<MenuItemType extends string = string> {
|
|
|
333
333
|
onMenuOpenChange?: (isOpen: boolean) => void;
|
|
334
334
|
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
335
335
|
style?: CSSProperties;
|
|
336
|
+
dragIndicatorStyle?:
|
|
337
|
+
| CSSProperties
|
|
338
|
+
| ((props: {
|
|
339
|
+
depth: number;
|
|
340
|
+
indentation: number;
|
|
341
|
+
position: RelativeDropPosition;
|
|
342
|
+
}) => CSSProperties);
|
|
336
343
|
}
|
|
337
344
|
|
|
338
345
|
const ListViewRow = forwardRef(function ListViewRow<
|
|
@@ -359,6 +366,7 @@ const ListViewRow = forwardRef(function ListViewRow<
|
|
|
359
366
|
onMenuOpenChange,
|
|
360
367
|
onKeyDown,
|
|
361
368
|
style,
|
|
369
|
+
dragIndicatorStyle,
|
|
362
370
|
}: ListViewRowProps<MenuItemType>,
|
|
363
371
|
forwardedRef: ForwardedRef<HTMLElement>
|
|
364
372
|
) {
|
|
@@ -461,7 +469,16 @@ const ListViewRow = forwardRef(function ListViewRow<
|
|
|
461
469
|
$colorScheme={colorScheme}
|
|
462
470
|
$relativeDropPosition={relativeDropPosition}
|
|
463
471
|
$offsetLeft={33 + depth * indentation}
|
|
464
|
-
$gap={listGap}
|
|
472
|
+
$gap={listGap + (divider ? 1 : 0)}
|
|
473
|
+
style={
|
|
474
|
+
typeof dragIndicatorStyle === "function"
|
|
475
|
+
? dragIndicatorStyle({
|
|
476
|
+
depth,
|
|
477
|
+
indentation,
|
|
478
|
+
position: relativeDropPosition,
|
|
479
|
+
})
|
|
480
|
+
: dragIndicatorStyle
|
|
481
|
+
}
|
|
465
482
|
/>
|
|
466
483
|
)}
|
|
467
484
|
{depth > 0 && <Spacer.Horizontal size={depth * indentation} />}
|
|
@@ -77,7 +77,7 @@ const SelectElement = styled.select<{ $flex: CSSProperties["flex"] }>(
|
|
|
77
77
|
borderRadius: "4px",
|
|
78
78
|
paddingTop: "4px",
|
|
79
79
|
paddingBottom: "4px",
|
|
80
|
-
paddingLeft: "
|
|
80
|
+
paddingLeft: "6px",
|
|
81
81
|
paddingRight: "23px",
|
|
82
82
|
background: [
|
|
83
83
|
`calc(100% - 6px) / 15px url("data:image/svg+xml;utf8,${createChevronSVGString(
|