@serendie/ui 3.2.1 → 3.2.2-dev.202604270058
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/client.js +35 -32
- package/dist/components/BottomNavigation/BottomNavigation.js +12 -11
- package/dist/components/DataTable/table/BodyCell.js +3 -2
- package/dist/components/DataTable/table/HeaderCell.js +13 -12
- package/dist/components/DataTable/table/Root.js +5 -4
- package/dist/components/Slider/Slider.d.ts +47 -0
- package/dist/components/Slider/Slider.js +232 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +5 -0
- package/dist/components/Tabs/TabItem.js +12 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.js +39 -36
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-control.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-dragging-indicator.js +18 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-hidden-input.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-label.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-marker-group.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-marker.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-range.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-root-provider.js +20 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-root.js +46 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-thumb.js +21 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-track.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider-value-text.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/slider.js +32 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/use-slider-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/use-slider-thumb-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/slider/use-slider.js +19 -0
- package/dist/node_modules/@zag-js/dom-query/dist/event.js +36 -31
- package/dist/node_modules/@zag-js/dom-query/dist/form.js +31 -21
- package/dist/node_modules/@zag-js/dom-query/dist/pointer-move.js +29 -0
- package/dist/node_modules/@zag-js/slider/dist/slider.anatomy.js +17 -0
- package/dist/node_modules/@zag-js/slider/dist/slider.connect.js +272 -0
- package/dist/node_modules/@zag-js/slider/dist/slider.dom.js +88 -0
- package/dist/node_modules/@zag-js/slider/dist/slider.machine.js +309 -0
- package/dist/node_modules/@zag-js/slider/dist/slider.style.js +119 -0
- package/dist/node_modules/@zag-js/slider/dist/slider.utils.js +105 -0
- package/dist/node_modules/@zag-js/utils/dist/number.js +63 -8
- package/dist/node_modules/@zag-js/utils/dist/object.js +17 -8
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -3,7 +3,7 @@ import { SerendiePreset as r } from "./preset.js";
|
|
|
3
3
|
import { ThemeContext as a, resolveTheme as m, useThemeContext as p } from "./theme/ThemeContext.js";
|
|
4
4
|
import { useSystemColorScheme as x } from "./theme/useSystemColorScheme.js";
|
|
5
5
|
import { ColorSchemeScript as s, getColorSchemeScript as f } from "./theme/initColorScheme.js";
|
|
6
|
-
import { formatDateByLang as l, getTranslations as d, useTranslations as
|
|
6
|
+
import { formatDateByLang as l, getTranslations as d, useTranslations as S } from "./i18n/index.js";
|
|
7
7
|
import { Accordion as C } from "./components/Accordion/Accordion.js";
|
|
8
8
|
import { AccordionGroup as u } from "./components/Accordion/AccordionGroup.js";
|
|
9
9
|
import { Avatar as y, AvatarStyle as T } from "./components/Avatar/Avatar.js";
|
|
@@ -20,7 +20,7 @@ import { DashboardWidget as po } from "./components/DashboardWidget/DashboardWid
|
|
|
20
20
|
import { DataTable as xo } from "./components/DataTable/index.js";
|
|
21
21
|
import { DatePicker as so } from "./components/DatePicker/DatePicker.js";
|
|
22
22
|
import { Divider as co, DividerStyle as lo } from "./components/Divider/Divider.js";
|
|
23
|
-
import { Drawer as
|
|
23
|
+
import { Drawer as ho } from "./components/Drawer/Drawer.js";
|
|
24
24
|
import { DropdownMenu as go, DropdownMenuStyle as uo } from "./components/DropdownMenu/DropdownMenu.js";
|
|
25
25
|
import { IconButton as yo, IconButtonStyle as To } from "./components/IconButton/IconButton.js";
|
|
26
26
|
import { List as Po } from "./components/List/List.js";
|
|
@@ -35,17 +35,18 @@ import { RadioButton as Eo, RadioButtonStyle as Ho, radioCheckedIconCss as Jo, r
|
|
|
35
35
|
import { RadioGroup as Vo } from "./components/RadioButton/RadioGroup.js";
|
|
36
36
|
import { Search as Yo, SearchStyle as Zo } from "./components/Search/Search.js";
|
|
37
37
|
import { Select as $o, SelectStyle as oe } from "./components/Select/Select.js";
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
38
|
+
import { Slider as re, SliderStyle as te } from "./components/Slider/Slider.js";
|
|
39
|
+
import { Switch as me, SwitchStyle as pe } from "./components/Switch/Switch.js";
|
|
40
|
+
import { Tabs as xe, TabsStyle as ne } from "./components/Tabs/Tabs.js";
|
|
41
|
+
import { TabItem as fe, TabItemStyle as ce } from "./components/Tabs/TabItem.js";
|
|
42
|
+
import { TextArea as de } from "./components/TextArea/TextArea.js";
|
|
43
|
+
import { TextField as he } from "./components/TextField/TextField.js";
|
|
44
|
+
import { Toast as ge, ToastStyle as ue, toaster as Be } from "./components/Toast/Toast.js";
|
|
45
|
+
import { Tooltip as Te } from "./components/Tooltip/Tooltip.js";
|
|
46
|
+
import { TopAppBar as Pe } from "./components/TopAppBar/TopAppBar.js";
|
|
47
|
+
import { DataTableComponent as be } from "./components/DataTable/DataTableComponent.js";
|
|
48
|
+
import { LanguageProvider as ve, SerendieProvider as Me } from "./i18n/provider.js";
|
|
49
|
+
import { parse as Ae } from "./node_modules/@zag-js/date-picker/dist/date-picker.parse.js";
|
|
49
50
|
export {
|
|
50
51
|
C as Accordion,
|
|
51
52
|
u as AccordionGroup,
|
|
@@ -67,16 +68,16 @@ export {
|
|
|
67
68
|
s as ColorSchemeScript,
|
|
68
69
|
po as DashboardWidget,
|
|
69
70
|
xo as DataTable,
|
|
70
|
-
|
|
71
|
+
be as DataTableComponent,
|
|
71
72
|
so as DatePicker,
|
|
72
73
|
co as Divider,
|
|
73
74
|
lo as DividerStyle,
|
|
74
|
-
|
|
75
|
+
ho as Drawer,
|
|
75
76
|
go as DropdownMenu,
|
|
76
77
|
uo as DropdownMenuStyle,
|
|
77
78
|
yo as IconButton,
|
|
78
79
|
To as IconButtonStyle,
|
|
79
|
-
|
|
80
|
+
ve as LanguageProvider,
|
|
80
81
|
Po as List,
|
|
81
82
|
bo as ListItem,
|
|
82
83
|
ko as ListItemStyle,
|
|
@@ -96,20 +97,22 @@ export {
|
|
|
96
97
|
oe as SelectStyle,
|
|
97
98
|
W as SerendieChartTheme,
|
|
98
99
|
r as SerendiePreset,
|
|
99
|
-
|
|
100
|
-
re as
|
|
101
|
-
te as
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
Me as SerendieProvider,
|
|
101
|
+
re as Slider,
|
|
102
|
+
te as SliderStyle,
|
|
103
|
+
me as Switch,
|
|
104
|
+
pe as SwitchStyle,
|
|
105
|
+
fe as TabItem,
|
|
106
|
+
ce as TabItemStyle,
|
|
107
|
+
xe as Tabs,
|
|
108
|
+
ne as TabsStyle,
|
|
109
|
+
de as TextArea,
|
|
110
|
+
he as TextField,
|
|
108
111
|
a as ThemeContext,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
ge as Toast,
|
|
113
|
+
ue as ToastStyle,
|
|
114
|
+
Te as Tooltip,
|
|
115
|
+
Pe as TopAppBar,
|
|
113
116
|
$ as checkboxCheckedIconCss,
|
|
114
117
|
oo as checkboxIconCss,
|
|
115
118
|
eo as checkboxUncheckedIconCss,
|
|
@@ -121,18 +124,18 @@ export {
|
|
|
121
124
|
f as getColorSchemeScript,
|
|
122
125
|
d as getTranslations,
|
|
123
126
|
J as legendChartMargin,
|
|
124
|
-
|
|
127
|
+
Ae as parseDate,
|
|
125
128
|
Jo as radioCheckedIconCss,
|
|
126
129
|
Ko as radioIconCss,
|
|
127
130
|
Oo as radioUncheckedIconCss,
|
|
128
131
|
m as resolveTheme,
|
|
129
132
|
K as spaciousChartMargin,
|
|
130
|
-
|
|
133
|
+
Be as toaster,
|
|
131
134
|
O as useBarChartProps,
|
|
132
135
|
Q as useChartProps,
|
|
133
136
|
V as useLineChartProps,
|
|
134
137
|
X as usePieChartProps,
|
|
135
138
|
x as useSystemColorScheme,
|
|
136
139
|
p as useThemeContext,
|
|
137
|
-
|
|
140
|
+
S as useTranslations
|
|
138
141
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cx as s } from "../../styled-system/css/cx.js";
|
|
3
3
|
import { css as i } from "../../styled-system/css/css.js";
|
|
4
|
-
const
|
|
4
|
+
const p = ({
|
|
5
5
|
children: o,
|
|
6
|
-
className:
|
|
7
|
-
...
|
|
8
|
-
}) => /* @__PURE__ */
|
|
6
|
+
className: t,
|
|
7
|
+
...e
|
|
8
|
+
}) => /* @__PURE__ */ r(
|
|
9
9
|
"nav",
|
|
10
10
|
{
|
|
11
|
-
className:
|
|
11
|
+
className: s(
|
|
12
12
|
i({
|
|
13
13
|
display: "flex",
|
|
14
14
|
alignItems: "center",
|
|
15
15
|
justifyContent: "space-around",
|
|
16
16
|
height: 64,
|
|
17
17
|
paddingX: "sd.system.dimension.spacing.medium",
|
|
18
|
-
|
|
18
|
+
borderTopWidth: "1px",
|
|
19
|
+
borderTopStyle: "solid",
|
|
19
20
|
borderTopColor: "sd.system.color.component.outline"
|
|
20
21
|
}),
|
|
21
|
-
|
|
22
|
+
t
|
|
22
23
|
),
|
|
23
|
-
...
|
|
24
|
+
...e,
|
|
24
25
|
children: o
|
|
25
26
|
}
|
|
26
27
|
);
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
p as BottomNavigation
|
|
29
30
|
};
|
|
@@ -4,8 +4,9 @@ import { cx as m } from "../../../styled-system/css/cx.js";
|
|
|
4
4
|
import { cva as d } from "../../../styled-system/css/cva.js";
|
|
5
5
|
const p = d({
|
|
6
6
|
base: {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
borderBottomWidth: "1px",
|
|
8
|
+
borderBottomStyle: "solid",
|
|
9
|
+
borderBottomColor: "sd.system.color.component.outline",
|
|
9
10
|
fontFamily: "Roboto, sans-serif",
|
|
10
11
|
color: "sd.system.color.component.onSurface",
|
|
11
12
|
textAlign: "left",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as l, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import f from "react";
|
|
3
|
-
import { SerendieSymbol as
|
|
3
|
+
import { SerendieSymbol as a } from "@serendie/symbols";
|
|
4
4
|
import { css as y } from "../../../styled-system/css/css.js";
|
|
5
5
|
import { cx as u } from "../../../styled-system/css/cx.js";
|
|
6
6
|
import { cva as g } from "../../../styled-system/css/cva.js";
|
|
7
7
|
const h = g({
|
|
8
8
|
base: {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
borderBottomWidth: "1px",
|
|
10
|
+
borderBottomStyle: "solid",
|
|
11
|
+
borderBottomColor: "sd.system.color.component.outline",
|
|
11
12
|
fontFamily: "Roboto, sans-serif",
|
|
12
13
|
color: "sd.system.color.component.onSurface",
|
|
13
14
|
textAlign: "left",
|
|
@@ -23,13 +24,13 @@ const h = g({
|
|
|
23
24
|
defaultVariants: {}
|
|
24
25
|
}), A = f.forwardRef(
|
|
25
26
|
({
|
|
26
|
-
children:
|
|
27
|
+
children: s,
|
|
27
28
|
size: r = "medium",
|
|
28
29
|
state: d = "enabled",
|
|
29
30
|
sortable: e = !1,
|
|
30
31
|
sortDirection: n,
|
|
31
32
|
onSort: o,
|
|
32
|
-
className:
|
|
33
|
+
className: i,
|
|
33
34
|
...m
|
|
34
35
|
}, c) => /* @__PURE__ */ l(
|
|
35
36
|
"th",
|
|
@@ -39,10 +40,10 @@ const h = g({
|
|
|
39
40
|
"aria-sort": n === "asc" ? "ascending" : n === "desc" ? "descending" : e ? "none" : void 0,
|
|
40
41
|
tabIndex: e ? 0 : void 0,
|
|
41
42
|
onClick: e ? o : void 0,
|
|
42
|
-
onKeyDown: (
|
|
43
|
-
e && (
|
|
43
|
+
onKeyDown: (t) => {
|
|
44
|
+
e && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), o == null || o());
|
|
44
45
|
},
|
|
45
|
-
className: u(h({ size: r, state: d }),
|
|
46
|
+
className: u(h({ size: r, state: d }), i),
|
|
46
47
|
style: {
|
|
47
48
|
cursor: e ? "pointer" : "default",
|
|
48
49
|
userSelect: "none"
|
|
@@ -57,21 +58,21 @@ const h = g({
|
|
|
57
58
|
verticalAlign: "middle"
|
|
58
59
|
}),
|
|
59
60
|
children: [
|
|
60
|
-
|
|
61
|
+
s,
|
|
61
62
|
e && (n === "asc" ? /* @__PURE__ */ l(
|
|
62
|
-
|
|
63
|
+
a,
|
|
63
64
|
{
|
|
64
65
|
name: "chevron-double-up",
|
|
65
66
|
style: { marginLeft: 4 }
|
|
66
67
|
}
|
|
67
68
|
) : n === "desc" ? /* @__PURE__ */ l(
|
|
68
|
-
|
|
69
|
+
a,
|
|
69
70
|
{
|
|
70
71
|
name: "chevron-double-down",
|
|
71
72
|
style: { marginLeft: 4 }
|
|
72
73
|
}
|
|
73
74
|
) : /* @__PURE__ */ l(
|
|
74
|
-
|
|
75
|
+
a,
|
|
75
76
|
{
|
|
76
77
|
name: "chevron-up-down",
|
|
77
78
|
style: { marginLeft: 4 }
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import l from "react";
|
|
3
3
|
import { cx as c } from "../../../styled-system/css/cx.js";
|
|
4
|
-
import { sva as
|
|
5
|
-
const
|
|
4
|
+
import { sva as d } from "../../../styled-system/css/sva.js";
|
|
5
|
+
const n = d({
|
|
6
6
|
slots: ["container", "table"],
|
|
7
7
|
base: {
|
|
8
8
|
container: {
|
|
9
|
-
|
|
9
|
+
borderWidth: "1px",
|
|
10
|
+
borderStyle: "solid",
|
|
10
11
|
borderColor: "sd.system.color.component.outline",
|
|
11
12
|
borderRadius: "4px",
|
|
12
13
|
overflow: "hidden",
|
|
@@ -21,7 +22,7 @@ const d = n({
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}), f = l.forwardRef(({ children: r, className: t, ...a }, s) => {
|
|
24
|
-
const o =
|
|
25
|
+
const o = n();
|
|
25
26
|
return /* @__PURE__ */ e("div", { ref: s, className: c(o.container, t), ...a, children: /* @__PURE__ */ e("table", { role: "table", className: o.table, children: r }) });
|
|
26
27
|
});
|
|
27
28
|
export {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Slider as ArkSlider, SliderRootProps } from '@ark-ui/react';
|
|
2
|
+
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
3
|
+
export declare const SliderStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"marker" | "label" | "track" | "root" | "labels" | "range" | "control" | "labelEnd" | "thumb" | "markerGroup" | "markerInRange" | "markerAfterRange", {
|
|
4
|
+
size: {
|
|
5
|
+
medium: {
|
|
6
|
+
track: {
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
thumb: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
marker: {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
large: {
|
|
19
|
+
track: {
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
thumb: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
marker: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
type SliderItemProps = {
|
|
34
|
+
startLabel?: string;
|
|
35
|
+
endLabel?: string;
|
|
36
|
+
/** Custom marker positions for display only (does not affect snapping). Defaults to 10% increments. */
|
|
37
|
+
markerValues?: number[];
|
|
38
|
+
/** Whether to show markers on the track. Defaults to true. */
|
|
39
|
+
showMarkers?: boolean;
|
|
40
|
+
/** Step value for the slider. Defaults to 1. */
|
|
41
|
+
step?: number;
|
|
42
|
+
};
|
|
43
|
+
export type SliderProps = SliderRootProps & RecipeVariantProps<typeof SliderStyle> & SliderItemProps;
|
|
44
|
+
export declare const Slider: import('react').ForwardRefExoticComponent<ArkSlider.RootProps & {
|
|
45
|
+
size?: "large" | "medium" | undefined;
|
|
46
|
+
} & SliderItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { slider_exports as o } from "../../node_modules/@ark-ui/react/dist/components/slider/slider.js";
|
|
3
|
+
import { forwardRef as S } from "react";
|
|
4
|
+
import { Tooltip as R } from "../Tooltip/Tooltip.js";
|
|
5
|
+
import { cx as u } from "../../styled-system/css/cx.js";
|
|
6
|
+
import { sva as w } from "../../styled-system/css/sva.js";
|
|
7
|
+
const p = w({
|
|
8
|
+
slots: [
|
|
9
|
+
"root",
|
|
10
|
+
"labels",
|
|
11
|
+
"label",
|
|
12
|
+
"labelEnd",
|
|
13
|
+
"control",
|
|
14
|
+
"track",
|
|
15
|
+
"range",
|
|
16
|
+
"thumb",
|
|
17
|
+
"markerGroup",
|
|
18
|
+
"marker",
|
|
19
|
+
"markerInRange",
|
|
20
|
+
"markerAfterRange"
|
|
21
|
+
],
|
|
22
|
+
base: {
|
|
23
|
+
root: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
gap: "sd.system.dimension.spacing.small",
|
|
27
|
+
width: "100%"
|
|
28
|
+
},
|
|
29
|
+
labels: {
|
|
30
|
+
display: "flex",
|
|
31
|
+
justifyContent: "space-between",
|
|
32
|
+
width: "100%"
|
|
33
|
+
},
|
|
34
|
+
label: {
|
|
35
|
+
color: "sd.system.color.component.onSurface",
|
|
36
|
+
textStyle: "sd.system.typography.body.medium_compact",
|
|
37
|
+
_disabled: {
|
|
38
|
+
color: "sd.system.color.interaction.disabledOnSurface"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
labelEnd: {
|
|
42
|
+
color: "sd.system.color.component.onSurface",
|
|
43
|
+
textStyle: "sd.system.typography.body.medium_compact",
|
|
44
|
+
"[data-disabled] &": {
|
|
45
|
+
color: "sd.system.color.interaction.disabledOnSurface"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
control: {
|
|
49
|
+
position: "relative",
|
|
50
|
+
width: "100%"
|
|
51
|
+
},
|
|
52
|
+
track: {
|
|
53
|
+
position: "relative",
|
|
54
|
+
width: "100%",
|
|
55
|
+
backgroundColor: "sd.system.color.component.outlineBright",
|
|
56
|
+
borderRadius: "sd.system.dimension.radius.full",
|
|
57
|
+
cursor: "pointer",
|
|
58
|
+
zIndex: 0,
|
|
59
|
+
_disabled: {
|
|
60
|
+
backgroundColor: "sd.system.color.interaction.disabled",
|
|
61
|
+
cursor: "default"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
range: {
|
|
65
|
+
position: "absolute",
|
|
66
|
+
top: 0,
|
|
67
|
+
left: 0,
|
|
68
|
+
backgroundColor: "sd.system.color.impression.secondary",
|
|
69
|
+
borderRadius: "sd.system.dimension.radius.full",
|
|
70
|
+
height: "100%",
|
|
71
|
+
zIndex: 1,
|
|
72
|
+
_disabled: {
|
|
73
|
+
backgroundColor: "sd.system.color.interaction.disabledOnSurface"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
thumb: {
|
|
77
|
+
display: "flex",
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
justifyContent: "center",
|
|
80
|
+
top: "50%",
|
|
81
|
+
"--slider-thumb-transform": "translate(-50%, -50%)",
|
|
82
|
+
backgroundColor: "sd.system.color.impression.primary",
|
|
83
|
+
borderRadius: "sd.system.dimension.radius.full",
|
|
84
|
+
borderWidth: 0,
|
|
85
|
+
cursor: "pointer",
|
|
86
|
+
outline: "none",
|
|
87
|
+
zIndex: 2,
|
|
88
|
+
"&:hover:not(:focus-visible):not([data-disabled]), &[data-dragging]:not([data-disabled])": {
|
|
89
|
+
backgroundImage: "linear-gradient(0deg, {colors.sd.system.color.interaction.hovered} 0%, {colors.sd.system.color.interaction.hovered} 100%)"
|
|
90
|
+
},
|
|
91
|
+
"&:focus": {
|
|
92
|
+
outline: "none"
|
|
93
|
+
},
|
|
94
|
+
"&:focus-visible": {
|
|
95
|
+
backgroundColor: "sd.system.color.component.surface",
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
borderColor: "sd.system.color.impression.primary",
|
|
98
|
+
boxShadow: "none",
|
|
99
|
+
outline: "none"
|
|
100
|
+
},
|
|
101
|
+
_disabled: {
|
|
102
|
+
backgroundColor: "sd.system.color.interaction.disabledOnSurface",
|
|
103
|
+
cursor: "default"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
markerGroup: {
|
|
107
|
+
position: "absolute",
|
|
108
|
+
top: 0,
|
|
109
|
+
left: 0,
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: "100%",
|
|
112
|
+
pointerEvents: "none",
|
|
113
|
+
zIndex: 2
|
|
114
|
+
},
|
|
115
|
+
marker: {
|
|
116
|
+
position: "absolute",
|
|
117
|
+
width: 2,
|
|
118
|
+
height: 2,
|
|
119
|
+
borderRadius: "sd.system.dimension.radius.full",
|
|
120
|
+
transform: "translate(-50%, -50%)",
|
|
121
|
+
top: "50%"
|
|
122
|
+
},
|
|
123
|
+
markerInRange: {
|
|
124
|
+
backgroundColor: "sd.system.color.impression.primary",
|
|
125
|
+
_disabled: {
|
|
126
|
+
backgroundColor: "sd.system.color.interaction.disabledOnSurface"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
markerAfterRange: {
|
|
130
|
+
backgroundColor: "sd.system.color.interaction.disabledOnSurface"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
variants: {
|
|
134
|
+
size: {
|
|
135
|
+
medium: {
|
|
136
|
+
track: {
|
|
137
|
+
height: 4
|
|
138
|
+
},
|
|
139
|
+
thumb: {
|
|
140
|
+
width: 16,
|
|
141
|
+
height: 16
|
|
142
|
+
},
|
|
143
|
+
marker: {
|
|
144
|
+
width: 2,
|
|
145
|
+
height: 2
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
large: {
|
|
149
|
+
track: {
|
|
150
|
+
height: 8
|
|
151
|
+
},
|
|
152
|
+
thumb: {
|
|
153
|
+
width: 24,
|
|
154
|
+
height: 24
|
|
155
|
+
},
|
|
156
|
+
marker: {
|
|
157
|
+
width: 4,
|
|
158
|
+
height: 4
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
defaultVariants: {
|
|
164
|
+
size: "medium"
|
|
165
|
+
}
|
|
166
|
+
}), v = S(
|
|
167
|
+
({
|
|
168
|
+
startLabel: d,
|
|
169
|
+
endLabel: l,
|
|
170
|
+
markerValues: a,
|
|
171
|
+
showMarkers: b = !0,
|
|
172
|
+
step: h = 1,
|
|
173
|
+
className: g,
|
|
174
|
+
min: n = 0,
|
|
175
|
+
max: c = 100,
|
|
176
|
+
...y
|
|
177
|
+
}, f) => {
|
|
178
|
+
const [k, m] = p.splitVariantProps(y), e = p(k), x = a != null && a.length ? a.filter((s) => s > n && s < c) : Array.from({ length: 9 }, (s, t) => n + (c - n) * (t + 1) / 10);
|
|
179
|
+
return /* @__PURE__ */ i(
|
|
180
|
+
o.Root,
|
|
181
|
+
{
|
|
182
|
+
ref: f,
|
|
183
|
+
className: u(e.root, g),
|
|
184
|
+
min: n,
|
|
185
|
+
max: c,
|
|
186
|
+
step: h,
|
|
187
|
+
...m,
|
|
188
|
+
children: [
|
|
189
|
+
(d || l) && /* @__PURE__ */ i("div", { className: e.labels, children: [
|
|
190
|
+
d && /* @__PURE__ */ r(o.Label, { className: e.label, children: d }),
|
|
191
|
+
l && /* @__PURE__ */ r("span", { className: e.labelEnd, children: l })
|
|
192
|
+
] }),
|
|
193
|
+
/* @__PURE__ */ i(o.Control, { className: e.control, children: [
|
|
194
|
+
/* @__PURE__ */ i(o.Track, { className: e.track, children: [
|
|
195
|
+
/* @__PURE__ */ r(o.Range, { className: e.range }),
|
|
196
|
+
b && /* @__PURE__ */ r(o.Context, { children: (s) => /* @__PURE__ */ r(o.MarkerGroup, { className: e.markerGroup, children: x.map((t) => {
|
|
197
|
+
const C = t <= s.value[0];
|
|
198
|
+
return /* @__PURE__ */ r(
|
|
199
|
+
o.Marker,
|
|
200
|
+
{
|
|
201
|
+
value: t,
|
|
202
|
+
className: u(
|
|
203
|
+
e.marker,
|
|
204
|
+
C ? e.markerInRange : e.markerAfterRange
|
|
205
|
+
)
|
|
206
|
+
},
|
|
207
|
+
t
|
|
208
|
+
);
|
|
209
|
+
}) }) })
|
|
210
|
+
] }),
|
|
211
|
+
/* @__PURE__ */ r(o.Context, { children: (s) => /* @__PURE__ */ r(
|
|
212
|
+
R,
|
|
213
|
+
{
|
|
214
|
+
content: String(s.value[0]),
|
|
215
|
+
placement: "top",
|
|
216
|
+
openDelay: 0,
|
|
217
|
+
closeDelay: 0,
|
|
218
|
+
disabled: m.disabled || s.dragging,
|
|
219
|
+
children: /* @__PURE__ */ r(o.Thumb, { index: 0, className: e.thumb, children: /* @__PURE__ */ r(o.HiddenInput, {}) })
|
|
220
|
+
}
|
|
221
|
+
) })
|
|
222
|
+
] })
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
v.displayName = "Slider";
|
|
229
|
+
export {
|
|
230
|
+
v as Slider,
|
|
231
|
+
p as SliderStyle
|
|
232
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Slider.tsx';
|
|
@@ -2,8 +2,8 @@ import { jsxs as y, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { tabs_exports as b } from "../../node_modules/@ark-ui/react/dist/components/tabs/tabs.js";
|
|
3
3
|
import { NotificationBadge as i } from "../NotificationBadge/NotificationBadge.js";
|
|
4
4
|
import { cx as u } from "../../styled-system/css/cx.js";
|
|
5
|
-
import { sva as
|
|
6
|
-
const l =
|
|
5
|
+
import { sva as h } from "../../styled-system/css/sva.js";
|
|
6
|
+
const l = h({
|
|
7
7
|
slots: ["trigger", "dot", "badgeBox", "badge"],
|
|
8
8
|
base: {
|
|
9
9
|
trigger: {
|
|
@@ -18,7 +18,8 @@ const l = x({
|
|
|
18
18
|
transitionDuration: ".2s",
|
|
19
19
|
transitionProperty: "color, border-color",
|
|
20
20
|
transitionTimingFunction: "cubic-bezier(.2, 0, 0, 1)",
|
|
21
|
-
|
|
21
|
+
borderBottomWidth: "2px",
|
|
22
|
+
borderBottomStyle: "solid",
|
|
22
23
|
borderBottomColor: "transparent",
|
|
23
24
|
textStyle: "sd.system.typography.label.large_compact",
|
|
24
25
|
_expanded: {
|
|
@@ -58,30 +59,30 @@ const l = x({
|
|
|
58
59
|
backgroundColor: "color-mix(in srgb, {colors.sd.system.color.interaction.hoveredOnPrimary}, {colors.sd.system.color.impression.negativeContainer});"
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
}),
|
|
62
|
+
}), v = ({
|
|
62
63
|
title: n,
|
|
63
64
|
value: a,
|
|
64
|
-
disabled:
|
|
65
|
+
disabled: t,
|
|
65
66
|
dot: c,
|
|
66
|
-
badge:
|
|
67
|
+
badge: r,
|
|
67
68
|
className: d,
|
|
68
69
|
...m
|
|
69
70
|
}) => {
|
|
70
|
-
const [p, g] = l.splitVariantProps(m), e = l(p), s =
|
|
71
|
+
const [p, g] = l.splitVariantProps(m), e = l(p), s = t ? e.badge : "";
|
|
71
72
|
return /* @__PURE__ */ y(
|
|
72
73
|
b.Trigger,
|
|
73
74
|
{
|
|
74
75
|
value: a,
|
|
75
76
|
className: u(e.trigger, d),
|
|
76
|
-
disabled:
|
|
77
|
+
disabled: t,
|
|
77
78
|
...g,
|
|
78
79
|
children: [
|
|
79
80
|
/* @__PURE__ */ o("span", { children: n }),
|
|
80
81
|
c && /* @__PURE__ */ o("div", { className: e.dot, children: /* @__PURE__ */ o(i, { noNumber: !0, className: s }) }),
|
|
81
|
-
|
|
82
|
+
r && /* @__PURE__ */ o("div", { className: e.badgeBox, children: /* @__PURE__ */ o(
|
|
82
83
|
i,
|
|
83
84
|
{
|
|
84
|
-
count:
|
|
85
|
+
count: r,
|
|
85
86
|
size: "small",
|
|
86
87
|
className: s
|
|
87
88
|
}
|
|
@@ -91,6 +92,6 @@ const l = x({
|
|
|
91
92
|
);
|
|
92
93
|
};
|
|
93
94
|
export {
|
|
94
|
-
|
|
95
|
+
v as TabItem,
|
|
95
96
|
l as TabItemStyle
|
|
96
97
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from './components/ProgressIndicator/index.ts';
|
|
|
26
26
|
export * from './components/RadioButton/index.ts';
|
|
27
27
|
export * from './components/Search/index.ts';
|
|
28
28
|
export * from './components/Select/index.ts';
|
|
29
|
+
export * from './components/Slider/index.ts';
|
|
29
30
|
export * from './components/Switch/index.ts';
|
|
30
31
|
export * from './components/Tabs/index.ts';
|
|
31
32
|
export * from './components/TextArea/index.ts';
|