@dbcdk/react-components 0.0.4 → 0.0.5
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/assets/logo.cjs +10 -10
- package/dist/assets/logo.js +10 -10
- package/dist/components/__stories__/story-components/Colors.cjs +159 -0
- package/dist/components/__stories__/story-components/Colors.d.ts +10 -0
- package/dist/components/__stories__/story-components/Colors.js +151 -0
- package/dist/components/__stories__/story-components/Colors.module.css +27 -0
- package/dist/components/__stories__/story-components/Spacing.cjs +190 -0
- package/dist/components/__stories__/story-components/Spacing.d.ts +1 -0
- package/dist/components/__stories__/story-components/Spacing.js +184 -0
- package/dist/components/__stories__/story-components/Spacing.module.css +154 -0
- package/dist/components/app-header/AppHeader.module.css +10 -15
- package/dist/components/attribute-chip/AttributeChip.cjs +22 -0
- package/dist/components/attribute-chip/AttributeChip.d.ts +8 -0
- package/dist/components/attribute-chip/AttributeChip.js +16 -0
- package/dist/components/attribute-chip/AttributeChip.module.css +65 -0
- package/dist/components/avatar/Avatar.cjs +38 -4
- package/dist/components/avatar/Avatar.d.ts +4 -2
- package/dist/components/avatar/Avatar.js +39 -5
- package/dist/components/avatar/Avatar.module.css +27 -0
- package/dist/components/breadcrumbs/Breadcrumbs.cjs +1 -2
- package/dist/components/breadcrumbs/Breadcrumbs.js +1 -2
- package/dist/components/breadcrumbs/Breadcrumbs.module.css +19 -22
- package/dist/components/button/Button.cjs +20 -12
- package/dist/components/button/Button.d.ts +4 -1
- package/dist/components/button/Button.js +20 -12
- package/dist/components/button/Button.module.css +118 -55
- package/dist/components/card/Card.cjs +53 -13
- package/dist/components/card/Card.d.ts +21 -6
- package/dist/components/card/Card.js +54 -14
- package/dist/components/card/Card.module.css +148 -44
- package/dist/components/card-container/CardContainer.cjs +6 -5
- package/dist/components/card-container/CardContainer.d.ts +5 -2
- package/dist/components/card-container/CardContainer.js +6 -5
- package/dist/components/card-container/CardContainer.module.css +40 -0
- package/dist/components/checkbox/Checkbox.cjs +3 -4
- package/dist/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.js +3 -4
- package/dist/components/checkbox/Checkbox.module.css +10 -10
- package/dist/components/chip/Chip.cjs +2 -1
- package/dist/components/chip/Chip.d.ts +2 -1
- package/dist/components/chip/Chip.js +2 -1
- package/dist/components/chip/Chip.module.css +42 -27
- package/dist/components/circle/Circle.module.css +11 -11
- package/dist/components/clear-button/ClearButton.cjs +3 -3
- package/dist/components/clear-button/ClearButton.js +3 -3
- package/dist/components/clear-button/ClearButton.module.css +8 -7
- package/dist/components/code-block/CodeBlock.cjs +18 -0
- package/dist/components/code-block/CodeBlock.d.ts +6 -0
- package/dist/components/code-block/CodeBlock.js +12 -0
- package/dist/components/code-block/CodeBlock.module.css +60 -0
- package/dist/components/copy-button/CopyButton.cjs +35 -0
- package/dist/components/copy-button/CopyButton.d.ts +9 -0
- package/dist/components/copy-button/CopyButton.js +29 -0
- package/dist/components/copy-button/CopyButton.module.css +6 -0
- package/dist/components/datetime-picker/DateTimePicker.cjs +504 -0
- package/dist/components/datetime-picker/DateTimePicker.d.ts +39 -0
- package/dist/components/datetime-picker/DateTimePicker.js +498 -0
- package/dist/components/datetime-picker/DateTimePicker.module.css +144 -0
- package/dist/components/filter-field/FilterField.cjs +34 -19
- package/dist/components/filter-field/FilterField.d.ts +2 -2
- package/dist/components/filter-field/FilterField.js +35 -20
- package/dist/components/filter-field/FilterField.module.css +14 -20
- package/dist/components/headline/Headline.cjs +10 -4
- package/dist/components/headline/Headline.d.ts +9 -1
- package/dist/components/headline/Headline.js +10 -4
- package/dist/components/headline/Headline.module.css +32 -7
- package/dist/components/icon/Icon.module.css +10 -9
- package/dist/components/input/Input.cjs +60 -19
- package/dist/components/input/Input.d.ts +7 -2
- package/dist/components/input/Input.js +60 -19
- package/dist/components/input/Input.module.css +90 -43
- package/dist/components/link/Link.cjs +46 -0
- package/dist/components/link/Link.d.ts +9 -0
- package/dist/components/link/Link.js +21 -0
- package/dist/components/link/Link.module.css +32 -0
- package/dist/components/menu/Menu.module.css +10 -32
- package/dist/components/meta-bar/MetaBar.cjs +29 -0
- package/dist/components/meta-bar/MetaBar.d.ts +11 -0
- package/dist/components/meta-bar/MetaBar.js +22 -0
- package/dist/components/meta-bar/MetaBar.module.css +12 -0
- package/dist/components/modal/Modal.cjs +134 -0
- package/dist/components/modal/Modal.d.ts +21 -0
- package/dist/components/modal/Modal.js +128 -0
- package/dist/components/modal/Modal.module.css +66 -0
- package/dist/components/modal/provider/ModalProvider.cjs +80 -0
- package/dist/components/modal/provider/ModalProvider.d.ts +21 -0
- package/dist/components/modal/provider/ModalProvider.js +77 -0
- package/dist/components/multi-select/MultiSelect.cjs +12 -1
- package/dist/components/multi-select/MultiSelect.js +12 -1
- package/dist/components/nav-bar/NavBar.module.css +11 -16
- package/dist/components/page/Page.module.css +2 -2
- package/dist/components/page-layout/PageLayout.cjs +5 -22
- package/dist/components/page-layout/PageLayout.d.ts +1 -8
- package/dist/components/page-layout/PageLayout.js +5 -22
- package/dist/components/page-layout/PageLayout.module.css +4 -80
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.cjs +32 -0
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.d.ts +11 -0
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.js +25 -0
- package/dist/components/page-layout/components/page-layout-hero/PageLayoutHero.module.css +84 -0
- package/dist/components/pagination/Pagination.cjs +83 -67
- package/dist/components/pagination/Pagination.d.ts +3 -1
- package/dist/components/pagination/Pagination.js +84 -68
- package/dist/components/pagination/Pagination.module.css +11 -3
- package/dist/components/panel/Panel.module.css +5 -7
- package/dist/components/popover/Popover.cjs +25 -8
- package/dist/components/popover/Popover.d.ts +2 -1
- package/dist/components/popover/Popover.js +25 -8
- package/dist/components/popover/Popover.module.css +4 -6
- package/dist/components/search-box/SearchBox.cjs +50 -37
- package/dist/components/search-box/SearchBox.d.ts +10 -7
- package/dist/components/search-box/SearchBox.js +50 -37
- package/dist/components/search-box/SearchBox.module.css +0 -1
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.cjs +12 -6
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +12 -6
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +5 -1
- package/dist/components/select/Select.cjs +82 -13
- package/dist/components/select/Select.d.ts +2 -1
- package/dist/components/select/Select.js +83 -14
- package/dist/components/sidebar/Sidebar.cjs +3 -30
- package/dist/components/sidebar/Sidebar.d.ts +2 -1
- package/dist/components/sidebar/Sidebar.js +4 -26
- package/dist/components/sidebar/components/SidebarItem.cjs +3 -1
- package/dist/components/sidebar/components/SidebarItem.js +3 -1
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.cjs +40 -14
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.d.ts +3 -1
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +40 -14
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +9 -38
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.cjs +50 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.d.ts +8 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +43 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +155 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.cjs +16 -9
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.d.ts +2 -1
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +16 -9
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +25 -12
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.cjs +2 -1
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.d.ts +1 -1
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +2 -1
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +29 -2
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +25 -2
- package/dist/components/sidebar/providers/SidebarProvider.cjs +108 -10
- package/dist/components/sidebar/providers/SidebarProvider.d.ts +7 -3
- package/dist/components/sidebar/providers/SidebarProvider.js +109 -11
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.cjs +1 -1
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +1 -1
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +0 -12
- package/dist/components/split-pane/SplitPane.cjs +123 -0
- package/dist/components/split-pane/SplitPane.d.ts +34 -0
- package/dist/components/split-pane/SplitPane.js +114 -0
- package/dist/components/split-pane/SplitPane.module.css +106 -0
- package/dist/components/split-pane/provider/SplitPaneContext.cjs +87 -0
- package/dist/components/split-pane/provider/SplitPaneContext.d.ts +23 -0
- package/dist/components/split-pane/provider/SplitPaneContext.js +79 -0
- package/dist/components/table/Table.cjs +180 -112
- package/dist/components/table/Table.d.ts +22 -6
- package/dist/components/table/Table.js +181 -113
- package/dist/components/table/Table.module.css +74 -47
- package/dist/components/table/components/empty-state/EmptyState.cjs +52 -0
- package/dist/components/table/components/empty-state/EmptyState.d.ts +40 -0
- package/dist/components/table/components/empty-state/EmptyState.js +46 -0
- package/dist/components/table/components/empty-state/EmptyState.module.css +16 -0
- package/dist/components/table/components/table-settings/TableSettings.cjs +32 -0
- package/dist/components/table/components/table-settings/TableSettings.d.ts +7 -0
- package/dist/components/table/components/table-settings/TableSettings.js +30 -0
- package/dist/{tanstack.cjs → components/table/tanstack.cjs} +61 -99
- package/dist/components/table/tanstack.d.ts +14 -0
- package/dist/{tanstack.js → components/table/tanstack.js} +61 -99
- package/dist/components/tabs/Tabs.cjs +33 -17
- package/dist/components/tabs/Tabs.d.ts +6 -3
- package/dist/components/tabs/Tabs.js +33 -17
- package/dist/components/tabs/Tabs.module.css +9 -9
- package/dist/components/toast/Toast.cjs +47 -0
- package/dist/components/toast/Toast.d.ts +14 -0
- package/dist/components/toast/Toast.js +41 -0
- package/dist/components/toast/Toast.module.css +101 -0
- package/dist/components/toast/provider/ToastProvider.cjs +98 -0
- package/dist/components/toast/provider/ToastProvider.d.ts +23 -0
- package/dist/components/toast/provider/ToastProvider.js +91 -0
- package/dist/components/tooltip/Tooltip.cjs +134 -29
- package/dist/components/tooltip/Tooltip.js +135 -30
- package/dist/components/tooltip/Tooltip.module.css +25 -43
- package/dist/components/user-display/UserDisplay.module.css +2 -2
- package/dist/constants/severity.cjs +12 -12
- package/dist/constants/severity.js +12 -12
- package/dist/constants/sizes.cjs +1 -0
- package/dist/constants/sizes.d.ts +1 -1
- package/dist/constants/sizes.js +1 -0
- package/dist/hooks/usePagination.cjs +88 -0
- package/dist/hooks/usePagination.d.ts +33 -0
- package/dist/hooks/usePagination.js +86 -0
- package/dist/hooks/useSorting.cjs +118 -0
- package/dist/hooks/useSorting.d.ts +49 -0
- package/dist/hooks/useSorting.js +116 -0
- package/dist/hooks/useTableData.cjs +52 -0
- package/dist/hooks/useTableData.d.ts +40 -0
- package/dist/hooks/useTableData.js +50 -0
- package/dist/hooks/useTableSelection.cjs +130 -0
- package/dist/hooks/useTableSelection.d.ts +25 -0
- package/dist/hooks/useTableSelection.js +128 -0
- package/dist/hooks/useTableSettings.cjs +28 -0
- package/dist/hooks/useTableSettings.d.ts +7 -0
- package/dist/hooks/useTableSettings.js +26 -0
- package/dist/hooks/useTimeDuration.cjs +39 -0
- package/dist/hooks/useTimeDuration.d.ts +22 -0
- package/dist/hooks/useTimeDuration.js +37 -0
- package/dist/hooks/useViewportFill.js +1 -1
- package/dist/index.cjs +119 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/src/styles/styles.css +101 -8
- package/dist/styles/css-helper-classes/flex.css +97 -0
- package/dist/styles/css-helper-classes/typography.css +7 -0
- package/dist/styles/styles.css +101 -8
- package/dist/styles/themes/dbc/dark.css +206 -99
- package/dist/styles/themes/dbc/light.css +183 -89
- package/dist/types/sizes.types.d.ts +2 -2
- package/package.json +17 -11
- package/dist/components/data-summary/DataSummary.cjs +0 -49
- package/dist/components/data-summary/DataSummary.d.ts +0 -19
- package/dist/components/data-summary/DataSummary.js +0 -43
- package/dist/components/data-summary/DataSummary.module.css +0 -51
- package/dist/components/sidebar/Sidebar.module.css +0 -66
- package/dist/tanstack.d.ts +0 -25
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef, useRef, useEffect } from 'react';
|
|
3
3
|
import styles from '../input/Input.module.css';
|
|
4
4
|
import { ClearButton } from '../clear-button/ClearButton';
|
|
5
|
+
import { Button } from '../button/Button';
|
|
5
6
|
|
|
6
7
|
function mergeRefs(...refs) {
|
|
7
8
|
return (node) => {
|
|
@@ -12,30 +13,70 @@ function mergeRefs(...refs) {
|
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
|
-
const Input = forwardRef(function Input2({
|
|
16
|
+
const Input = forwardRef(function Input2({
|
|
17
|
+
label,
|
|
18
|
+
icon,
|
|
19
|
+
minWidth,
|
|
20
|
+
width,
|
|
21
|
+
fullWidth,
|
|
22
|
+
inputSize = "md",
|
|
23
|
+
variant = "outlined",
|
|
24
|
+
autoFocus,
|
|
25
|
+
onClear,
|
|
26
|
+
onButtonClick,
|
|
27
|
+
buttonLabel,
|
|
28
|
+
buttonIcon,
|
|
29
|
+
style,
|
|
30
|
+
...rest
|
|
31
|
+
}, ref) {
|
|
16
32
|
const inputRef = useRef(null);
|
|
17
33
|
useEffect(() => {
|
|
18
34
|
var _a;
|
|
19
35
|
if (autoFocus) (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
20
36
|
}, [autoFocus]);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const hasButton = Boolean(onButtonClick || buttonLabel || buttonIcon);
|
|
38
|
+
const rootStyle = {
|
|
39
|
+
...style != null ? style : {},
|
|
40
|
+
...minWidth ? { ["--input-min-width"]: minWidth } : null,
|
|
41
|
+
...width ? { ["--input-width"]: width } : null
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
style: rootStyle,
|
|
47
|
+
className: [
|
|
48
|
+
styles.container,
|
|
49
|
+
fullWidth ? styles.fullWidth : "",
|
|
50
|
+
onClear ? styles.withClear : "",
|
|
51
|
+
hasButton ? styles.withButton : ""
|
|
52
|
+
].filter(Boolean).join(" "),
|
|
53
|
+
children: [
|
|
54
|
+
label && /* @__PURE__ */ jsx("label", { htmlFor: label, children: label }),
|
|
55
|
+
/* @__PURE__ */ jsxs("div", { className: styles.field, children: [
|
|
56
|
+
icon && /* @__PURE__ */ jsx("span", { className: styles.icon, children: icon }),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
"input",
|
|
59
|
+
{
|
|
60
|
+
id: label,
|
|
61
|
+
...rest,
|
|
62
|
+
ref: mergeRefs(inputRef, ref),
|
|
63
|
+
className: [
|
|
64
|
+
styles.input,
|
|
65
|
+
icon ? styles.inputWithIcon : "",
|
|
66
|
+
inputSize ? styles[inputSize] : "",
|
|
67
|
+
styles[variant]
|
|
68
|
+
].filter(Boolean).join(" ")
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
onClear && /* @__PURE__ */ jsx(ClearButton, { onClick: onClear, absolute: true })
|
|
72
|
+
] }),
|
|
73
|
+
hasButton && /* @__PURE__ */ jsxs(Button, { onClick: onButtonClick, className: styles.trailingButton, children: [
|
|
74
|
+
buttonIcon != null ? buttonIcon : null,
|
|
75
|
+
buttonLabel != null ? buttonLabel : null
|
|
76
|
+
] })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
39
80
|
});
|
|
40
81
|
Input.displayName = "Input";
|
|
41
82
|
|
|
@@ -1,27 +1,51 @@
|
|
|
1
|
-
/*
|
|
2
|
-
.
|
|
3
|
-
|
|
1
|
+
/* Root control group */
|
|
2
|
+
.container {
|
|
3
|
+
/* inline-flex makes width behave weird in parents */
|
|
4
4
|
display: inline-flex;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
gap: 0;
|
|
7
|
+
|
|
8
|
+
/* width control */
|
|
9
|
+
inline-size: var(--input-width, auto);
|
|
10
|
+
min-inline-size: var(--input-min-width, 0);
|
|
11
|
+
max-inline-size: var(--input-max-width, none);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* When you want it to take available space */
|
|
15
|
+
.fullWidth {
|
|
16
|
+
display: flex;
|
|
17
|
+
inline-size: 100%;
|
|
18
|
+
min-inline-size: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* The "field" (input + icons + clear) */
|
|
22
|
+
.field {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
5
25
|
align-items: center;
|
|
6
|
-
|
|
26
|
+
flex: 1 1 auto;
|
|
27
|
+
min-inline-size: 0; /* critical for ellipsis inside flex */
|
|
28
|
+
color: var(--color-fg-default);
|
|
7
29
|
}
|
|
8
30
|
|
|
9
|
-
/*
|
|
10
|
-
.
|
|
11
|
-
|
|
31
|
+
/* Actual input */
|
|
32
|
+
.input {
|
|
33
|
+
flex: 1 1 auto;
|
|
34
|
+
min-inline-size: 0; /* critical */
|
|
35
|
+
inline-size: 100%;
|
|
36
|
+
|
|
12
37
|
font-family: var(--font-family);
|
|
13
38
|
font-size: var(--font-size-sm);
|
|
14
39
|
line-height: var(--line-height-normal);
|
|
15
40
|
box-sizing: border-box;
|
|
41
|
+
text-overflow: ellipsis;
|
|
16
42
|
|
|
17
|
-
background-color: var(--color-surface);
|
|
18
|
-
border: var(--border-width-thin) solid var(--color-border);
|
|
43
|
+
background-color: var(--color-bg-surface);
|
|
44
|
+
border: var(--border-width-thin) solid var(--color-border-default);
|
|
19
45
|
border-radius: var(--border-radius-default);
|
|
20
46
|
|
|
21
|
-
/* density-aware paddings/heights */
|
|
22
47
|
padding-inline: var(--control-padding-x);
|
|
23
48
|
padding-block: calc(var(--control-padding-y) + var(--density));
|
|
24
|
-
min-block-size: calc(var(--component-size-md) + var(--density));
|
|
25
49
|
|
|
26
50
|
transition:
|
|
27
51
|
background-color var(--transition-fast) var(--ease-standard),
|
|
@@ -29,59 +53,75 @@
|
|
|
29
53
|
box-shadow var(--transition-fast) var(--ease-standard);
|
|
30
54
|
}
|
|
31
55
|
|
|
56
|
+
/* Button group styling */
|
|
57
|
+
.withButton .input {
|
|
58
|
+
border-top-right-radius: 0;
|
|
59
|
+
border-bottom-right-radius: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Optional: if ClearButton is absolutely positioned, reserve space */
|
|
63
|
+
.withClear .input {
|
|
64
|
+
padding-inline-end: calc(var(--control-padding-x) + 28px);
|
|
65
|
+
}
|
|
66
|
+
|
|
32
67
|
/* Placeholder */
|
|
33
|
-
.
|
|
34
|
-
color: var(--color-
|
|
68
|
+
.input::placeholder {
|
|
69
|
+
color: var(--color-fg-muted);
|
|
35
70
|
}
|
|
36
71
|
|
|
37
72
|
/* Hover & focus */
|
|
38
|
-
.
|
|
73
|
+
.input:hover {
|
|
39
74
|
border-color: var(--color-border-strong);
|
|
40
75
|
}
|
|
41
|
-
.
|
|
76
|
+
.input:focus-visible {
|
|
42
77
|
outline: none;
|
|
43
78
|
border-color: var(--color-border-selected);
|
|
44
79
|
box-shadow: var(--focus-ring);
|
|
45
80
|
}
|
|
46
81
|
|
|
47
|
-
/*
|
|
48
|
-
.
|
|
49
|
-
background-color: var(--color-surface);
|
|
82
|
+
/* Variants */
|
|
83
|
+
.filled {
|
|
84
|
+
background-color: var(--color-bg-surface);
|
|
50
85
|
border: 0;
|
|
51
86
|
}
|
|
52
|
-
|
|
53
|
-
/* Standalone / elevated variant */
|
|
54
|
-
.inputWrapper input.standalone {
|
|
87
|
+
.standalone {
|
|
55
88
|
border-radius: var(--border-radius-rounded);
|
|
56
|
-
background-color: var(--color-surface);
|
|
89
|
+
background-color: var(--color-bg-surface);
|
|
57
90
|
box-shadow: var(--shadow-xs), var(--shadow-md);
|
|
58
91
|
}
|
|
59
|
-
.
|
|
92
|
+
.standalone:focus-visible {
|
|
60
93
|
outline: none;
|
|
61
94
|
border-color: var(--color-border-selected);
|
|
62
95
|
box-shadow: var(--focus-ring);
|
|
63
96
|
}
|
|
97
|
+
.outlined {
|
|
98
|
+
background-color: transparent;
|
|
99
|
+
}
|
|
64
100
|
|
|
65
101
|
/* Sizes */
|
|
66
|
-
.
|
|
67
|
-
|
|
102
|
+
.xs {
|
|
103
|
+
block-size: calc(var(--component-size-xs) + var(--density));
|
|
104
|
+
font-size: var(--font-size-sm);
|
|
105
|
+
padding: 0 var(--spacing-xxs);
|
|
106
|
+
}
|
|
107
|
+
.sm {
|
|
108
|
+
block-size: calc(var(--component-size-sm) + var(--density));
|
|
68
109
|
font-size: var(--font-size-sm);
|
|
69
110
|
}
|
|
70
|
-
.
|
|
71
|
-
|
|
111
|
+
.md {
|
|
112
|
+
block-size: calc(var(--component-size-md) + var(--density));
|
|
72
113
|
font-size: var(--font-size-sm);
|
|
73
114
|
}
|
|
74
|
-
.
|
|
75
|
-
|
|
115
|
+
.lg {
|
|
116
|
+
block-size: calc(var(--component-size-lg) + var(--density));
|
|
76
117
|
font-size: var(--font-size-lg);
|
|
77
118
|
}
|
|
78
119
|
|
|
79
|
-
/*
|
|
80
|
-
.
|
|
81
|
-
padding-inline-start: calc(var(--icon-size) + var(--spacing-lg));
|
|
120
|
+
/* Leading icon */
|
|
121
|
+
.inputWithIcon {
|
|
122
|
+
padding-inline-start: calc(var(--icon-size-md) + var(--spacing-lg));
|
|
82
123
|
}
|
|
83
124
|
|
|
84
|
-
/* Icon */
|
|
85
125
|
.icon {
|
|
86
126
|
position: absolute;
|
|
87
127
|
inset-inline-start: var(--spacing-md);
|
|
@@ -90,23 +130,30 @@
|
|
|
90
130
|
display: inline-flex;
|
|
91
131
|
align-items: center;
|
|
92
132
|
justify-content: center;
|
|
93
|
-
inline-size: var(--icon-size);
|
|
94
|
-
block-size: var(--icon-size);
|
|
133
|
+
inline-size: var(--icon-size-md);
|
|
134
|
+
block-size: var(--icon-size-md);
|
|
95
135
|
pointer-events: none;
|
|
96
|
-
color: var(--color-
|
|
136
|
+
color: var(--color-fg-subtle);
|
|
97
137
|
}
|
|
98
138
|
.icon svg {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
block-size: var(--icon-size);
|
|
139
|
+
inline-size: var(--icon-size-md);
|
|
140
|
+
block-size: var(--icon-size-md);
|
|
102
141
|
}
|
|
103
142
|
|
|
104
|
-
/*
|
|
105
|
-
.
|
|
106
|
-
|
|
143
|
+
/* Trailing action button (outside field) */
|
|
144
|
+
.trailingButton {
|
|
145
|
+
flex: 0 0 auto;
|
|
146
|
+
border-top-left-radius: 0;
|
|
147
|
+
border-bottom-left-radius: 0;
|
|
148
|
+
border-left: var(--border-width-thin) solid transparent;
|
|
149
|
+
margin-left: calc(-1 * var(--border-width-thin));
|
|
150
|
+
}
|
|
151
|
+
.trailingButton:hover {
|
|
152
|
+
border-color: var(--color-border-default);
|
|
153
|
+
z-index: 2;
|
|
107
154
|
}
|
|
108
155
|
|
|
109
156
|
/* Date/time picker indicator (WebKit) */
|
|
110
|
-
.
|
|
157
|
+
.input[type='datetime-local']::-webkit-calendar-picker-indicator {
|
|
111
158
|
filter: invert(0.7);
|
|
112
159
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styles = require('./Link.module.css');
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
30
|
+
|
|
31
|
+
function Link({ component, icon, disableIcon }) {
|
|
32
|
+
const originalProps = component.props;
|
|
33
|
+
return React__namespace.cloneElement(
|
|
34
|
+
component,
|
|
35
|
+
{
|
|
36
|
+
...originalProps,
|
|
37
|
+
className: styles__default.default.link
|
|
38
|
+
},
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.content, children: originalProps.children }),
|
|
41
|
+
icon || !disableIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.icon, children: icon != null ? icon : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, {}) })
|
|
42
|
+
] })
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
exports.Link = Link;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface LinkProps {
|
|
3
|
+
component: React.ReactElement;
|
|
4
|
+
className?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
disableIcon?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function Link({ component, icon, disableIcon }: LinkProps): React.ReactElement;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import styles from './Link.module.css';
|
|
4
|
+
import { ArrowRight } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
function Link({ component, icon, disableIcon }) {
|
|
7
|
+
const originalProps = component.props;
|
|
8
|
+
return React.cloneElement(
|
|
9
|
+
component,
|
|
10
|
+
{
|
|
11
|
+
...originalProps,
|
|
12
|
+
className: styles.link
|
|
13
|
+
},
|
|
14
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15
|
+
/* @__PURE__ */ jsx("span", { className: styles.content, children: originalProps.children }),
|
|
16
|
+
icon || !disableIcon && /* @__PURE__ */ jsx("span", { className: styles.icon, children: icon != null ? icon : /* @__PURE__ */ jsx(ArrowRight, {}) })
|
|
17
|
+
] })
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { Link };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.link {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
gap: var(--spacing-xs);
|
|
4
|
+
position: relative;
|
|
5
|
+
text-decoration: none;
|
|
6
|
+
font-weight: bold;
|
|
7
|
+
color: inherit;
|
|
8
|
+
font-size: inherit;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.icon {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
color: var(--color-brand);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.link svg {
|
|
18
|
+
inline-size: var(--icon-size-sm);
|
|
19
|
+
block-size: var(--icon-size-sm);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.link::after {
|
|
23
|
+
content: '';
|
|
24
|
+
display: block;
|
|
25
|
+
height: var(--border-width-medium);
|
|
26
|
+
background-color: var(--color-brand);
|
|
27
|
+
width: 100%;
|
|
28
|
+
align-self: flex-end;
|
|
29
|
+
position: absolute;
|
|
30
|
+
left: 0;
|
|
31
|
+
bottom: calc(var(--spacing-xxs) * -1);
|
|
32
|
+
}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/* =========================
|
|
2
|
-
Panel (apply to dialog content)
|
|
3
|
-
========================= */
|
|
4
|
-
.panel {
|
|
5
|
-
background: var(--color-surface);
|
|
6
|
-
color: var(--color-text);
|
|
7
|
-
border: var(--border-width-thin) solid var(--color-border);
|
|
8
|
-
border-radius: var(--border-radius-md);
|
|
9
|
-
box-shadow: var(--shadow-md);
|
|
10
|
-
padding: var(--spacing-xs);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/* =========================
|
|
14
|
-
List (ul) — reset only
|
|
15
|
-
========================= */
|
|
16
1
|
.container {
|
|
17
2
|
list-style: none;
|
|
18
3
|
margin: 0;
|
|
@@ -20,35 +5,29 @@
|
|
|
20
5
|
background: transparent;
|
|
21
6
|
border: 0;
|
|
22
7
|
box-shadow: none;
|
|
23
|
-
|
|
24
8
|
display: flex;
|
|
25
9
|
flex-direction: column;
|
|
26
10
|
}
|
|
27
11
|
|
|
28
|
-
/* space between rows without adding inner borders */
|
|
29
12
|
.container > li + li {
|
|
30
13
|
margin-block-start: var(--spacing-2xs);
|
|
31
14
|
}
|
|
32
15
|
|
|
33
|
-
/* li wrapper (non-focusable) */
|
|
34
16
|
.row {
|
|
35
17
|
display: contents;
|
|
36
18
|
}
|
|
37
19
|
|
|
38
|
-
/* =========================
|
|
39
|
-
Interactive child (a/button/Link)
|
|
40
|
-
========================= */
|
|
41
20
|
.interactive {
|
|
42
21
|
display: flex;
|
|
43
22
|
align-items: center;
|
|
44
23
|
justify-content: flex-start;
|
|
45
24
|
gap: var(--spacing-xs);
|
|
46
|
-
|
|
47
25
|
inline-size: 100%;
|
|
48
26
|
text-align: start;
|
|
49
27
|
text-decoration: none;
|
|
50
28
|
|
|
51
|
-
|
|
29
|
+
/* choose your density */
|
|
30
|
+
padding-block: calc(var(--spacing-xs) + var(--density-comfortable));
|
|
52
31
|
padding-inline: var(--spacing-md);
|
|
53
32
|
|
|
54
33
|
background: transparent;
|
|
@@ -56,7 +35,7 @@
|
|
|
56
35
|
|
|
57
36
|
font-family: var(--font-family);
|
|
58
37
|
font-size: var(--font-size-sm);
|
|
59
|
-
color: var(--color-
|
|
38
|
+
color: var(--color-fg-default);
|
|
60
39
|
cursor: pointer;
|
|
61
40
|
|
|
62
41
|
border-radius: var(--border-radius-sm);
|
|
@@ -65,31 +44,30 @@
|
|
|
65
44
|
background-color var(--transition-fast) var(--ease-standard),
|
|
66
45
|
color var(--transition-fast) var(--ease-standard);
|
|
67
46
|
}
|
|
47
|
+
|
|
68
48
|
.interactive:hover {
|
|
69
|
-
background-color: var(--color-
|
|
49
|
+
background-color: var(--color-bg-hover-subtle);
|
|
70
50
|
}
|
|
51
|
+
|
|
71
52
|
.interactive:focus-visible {
|
|
72
53
|
outline: none;
|
|
73
54
|
box-shadow: var(--focus-ring);
|
|
74
55
|
}
|
|
75
56
|
|
|
76
|
-
/* Selected / active */
|
|
77
57
|
.active,
|
|
78
58
|
.interactive[aria-selected='true'] {
|
|
79
59
|
background-color: var(--color-bg-selected);
|
|
80
|
-
color: var(--color-
|
|
60
|
+
color: var(--color-fg-default);
|
|
81
61
|
}
|
|
82
62
|
|
|
83
|
-
/* Disabled */
|
|
84
63
|
.interactive[aria-disabled='true'],
|
|
85
64
|
.interactive:disabled {
|
|
86
|
-
color: var(--color-disabled-
|
|
65
|
+
color: var(--color-disabled-fg);
|
|
87
66
|
cursor: not-allowed;
|
|
88
67
|
pointer-events: none;
|
|
89
68
|
}
|
|
90
69
|
|
|
91
|
-
/* Icons inside items */
|
|
92
70
|
.interactive svg {
|
|
93
|
-
inline-size: var(--icon-size);
|
|
94
|
-
block-size: var(--icon-size);
|
|
71
|
+
inline-size: var(--icon-size-md);
|
|
72
|
+
block-size: var(--icon-size-md);
|
|
95
73
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var styles = require('./MetaBar.module.css');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
11
|
+
|
|
12
|
+
function MetaBar({ items, separator = "\u2022" }) {
|
|
13
|
+
const visibleItems = items.filter(
|
|
14
|
+
(item) => item.value !== null && item.value !== void 0 && item.value !== ""
|
|
15
|
+
);
|
|
16
|
+
if (visibleItems.length === 0) return null;
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.meta, children: visibleItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React__default.default.Fragment, { children: [
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
19
|
+
item.label && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
20
|
+
item.label,
|
|
21
|
+
": "
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.value })
|
|
24
|
+
] }),
|
|
25
|
+
index < visibleItems.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: styles__default.default.dot, children: separator })
|
|
26
|
+
] }, index)) });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
exports.MetaBar = MetaBar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MetaItem {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
value: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface MetaBarProps {
|
|
7
|
+
items: MetaItem[];
|
|
8
|
+
separator?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function MetaBar({ items, separator }: MetaBarProps): JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './MetaBar.module.css';
|
|
4
|
+
|
|
5
|
+
function MetaBar({ items, separator = "\u2022" }) {
|
|
6
|
+
const visibleItems = items.filter(
|
|
7
|
+
(item) => item.value !== null && item.value !== void 0 && item.value !== ""
|
|
8
|
+
);
|
|
9
|
+
if (visibleItems.length === 0) return null;
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { className: styles.meta, children: visibleItems.map((item, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
11
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
12
|
+
item.label && /* @__PURE__ */ jsxs("span", { children: [
|
|
13
|
+
item.label,
|
|
14
|
+
": "
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ jsx("span", { children: item.value })
|
|
17
|
+
] }),
|
|
18
|
+
index < visibleItems.length - 1 && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: styles.dot, children: separator })
|
|
19
|
+
] }, index)) });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { MetaBar };
|