@solostylist/ui-kit 1.0.155 → 1.0.157
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/main.d.ts +2 -0
- package/dist/main.js +101 -99
- package/dist/s-select-list/index.d.ts +2 -0
- package/dist/s-select-list/index.js +4 -0
- package/dist/s-select-list/package.json +5 -0
- package/dist/s-select-list/s-select-list.d.ts +33 -0
- package/dist/s-select-list/s-select-list.js +48 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export { default as SPagination } from './s-pagination/index';
|
|
|
67
67
|
export type { SPaginationProps } from './s-pagination/index';
|
|
68
68
|
export { default as SSelect } from './s-select/index';
|
|
69
69
|
export type { SSelectProps } from './s-select/index';
|
|
70
|
+
export { default as SSelectList } from './s-select-list/index';
|
|
71
|
+
export type { SSelectListProps, SSelectListItem } from './s-select-list/index';
|
|
70
72
|
export { default as SSkeleton } from './s-skeleton/index';
|
|
71
73
|
export type { SSkeletonProps } from './s-skeleton/index';
|
|
72
74
|
export { default as STip } from './s-tip/index';
|
package/dist/main.js
CHANGED
|
@@ -8,7 +8,7 @@ import { default as g } from "./s-button-link/s-button-link.js";
|
|
|
8
8
|
import { default as T } from "./s-carousel/s-carousel.js";
|
|
9
9
|
import { default as P } from "./s-chat-input/s-chat-input.js";
|
|
10
10
|
import { default as b } from "./s-chat-message/s-chat-message.js";
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as y } from "./s-comment-message/s-comment-message.js";
|
|
12
12
|
import { default as M } from "./s-text-editor/s-text-editor.js";
|
|
13
13
|
import "./s-text-editor/s-text-editor-toolbar.js";
|
|
14
14
|
import { default as I } from "./s-checkbox/s-checkbox.js";
|
|
@@ -34,56 +34,57 @@ import { default as ge } from "./s-overlay-scrollbar/s-overlay-scrollbar.js";
|
|
|
34
34
|
import { default as Te } from "./s-text-field/s-text-field.js";
|
|
35
35
|
import { default as Pe } from "./s-pagination/s-pagination.js";
|
|
36
36
|
import { default as be } from "./s-select/s-select.js";
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as Me } from "./s-
|
|
39
|
-
import { default as Ie } from "./s-
|
|
40
|
-
import { default as Fe
|
|
41
|
-
import { default as Ee } from "./s-
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import { default as Ue } from "./s-theme-
|
|
47
|
-
import { default as Xe } from "./s-
|
|
48
|
-
import { default as Ze } from "./s-
|
|
49
|
-
import { default as $e } from "./s-
|
|
50
|
-
import { default as oo } from "./s-
|
|
51
|
-
import { default as ao } from "./s-
|
|
52
|
-
import { default as fo } from "./s-
|
|
53
|
-
import { default as so } from "./s-
|
|
54
|
-
import { default as po } from "./s-
|
|
55
|
-
import { default as So } from "./s-
|
|
56
|
-
import {
|
|
57
|
-
import { default as co } from "./s-
|
|
58
|
-
import { default as Co } from "./s-
|
|
59
|
-
import { default as vo } from "./s-image
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as ho } from "./s-
|
|
63
|
-
import { default as ko } from "./s-
|
|
64
|
-
import { default as Bo } from "./s-
|
|
65
|
-
import { default as Ao } from "./s-
|
|
66
|
-
import { default as zo } from "./s-tabs/s-
|
|
67
|
-
import { default as Go } from "./s-tabs/s-tab
|
|
68
|
-
import { default as Oo } from "./s-
|
|
69
|
-
import { default as Ko } from "./s-
|
|
70
|
-
import {
|
|
71
|
-
import { default as Uo } from "./s-
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
37
|
+
import { default as ye } from "./s-select-list/s-select-list.js";
|
|
38
|
+
import { default as Me } from "./s-skeleton/s-skeleton.js";
|
|
39
|
+
import { default as Ie } from "./s-tip/s-tip.js";
|
|
40
|
+
import { default as Fe } from "./s-text-truncation/s-text-truncation.js";
|
|
41
|
+
import { default as we, SnackbarMessageProvider as Ae, useSnackbarMessage as Ee } from "./s-snackbar-message/s-snackbar-message.js";
|
|
42
|
+
import { default as Re } from "./s-form/s-form.js";
|
|
43
|
+
import { SSmartTextField as Ne } from "./s-smart-text-field/s-smart-text-field.js";
|
|
44
|
+
import { SCopilotKitProvider as je } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
|
|
45
|
+
import { SStripeCVC as Ve, SStripeExpiry as qe, SStripeNumber as He, StripeTextField as Je } from "./s-stripe/s-stripe.js";
|
|
46
|
+
import { default as Ue } from "./s-theme-provider/s-theme-provider.js";
|
|
47
|
+
import { default as Xe } from "./s-theme-switch/s-theme-switch.js";
|
|
48
|
+
import { default as Ze } from "./s-datetime-picker/s-datetime-picker.js";
|
|
49
|
+
import { default as $e } from "./s-date-picker/s-date-picker.js";
|
|
50
|
+
import { default as oo } from "./s-localization-provider/s-localization-provider.js";
|
|
51
|
+
import { default as ao } from "./s-gradient-icon/s-gradient-icon.js";
|
|
52
|
+
import { default as fo } from "./s-glow-button/s-glow-button.js";
|
|
53
|
+
import { default as so } from "./s-moving-border/s-moving-border.js";
|
|
54
|
+
import { default as po } from "./s-scroll-reveal/s-scroll-reveal.js";
|
|
55
|
+
import { default as So } from "./s-spotlight-cursor/s-spotlight-cursor.js";
|
|
56
|
+
import { default as io } from "./s-copyable-text/s-copyable-text.js";
|
|
57
|
+
import { MediaItem as go, default as co } from "./s-gallery/s-gallery.js";
|
|
58
|
+
import { default as Co } from "./s-image-modal/s-image-modal.js";
|
|
59
|
+
import { default as vo } from "./s-lazy-image/s-lazy-image.js";
|
|
60
|
+
import { default as Lo } from "./s-image-comparison/s-image-comparison.js";
|
|
61
|
+
import { default as Do } from "./s-item-not-found/s-item-not-found.js";
|
|
62
|
+
import { default as ho } from "./s-category-card/s-category-card.js";
|
|
63
|
+
import { default as ko } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
|
|
64
|
+
import { default as Bo } from "./s-rating/s-rating.js";
|
|
65
|
+
import { default as Ao } from "./s-review/s-review.js";
|
|
66
|
+
import { default as zo } from "./s-tabs/s-tabs.js";
|
|
67
|
+
import { default as Go } from "./s-tabs/s-tab.js";
|
|
68
|
+
import { default as Oo } from "./s-tabs/s-tab-panel.js";
|
|
69
|
+
import { default as Ko } from "./s-text-shimmer/s-text-shimmer.js";
|
|
70
|
+
import { default as qo } from "./s-typewriter-text/s-typewriter-text.js";
|
|
71
|
+
import { SLanguagePopover as Jo, default as Qo, defaultLanguageOptions as Uo } from "./s-language-switcher/s-language-switcher.js";
|
|
72
|
+
import { default as Xo } from "./s-scroll-to-top/s-scroll-to-top.js";
|
|
73
|
+
import { useDialog as Zo } from "./hooks/use-dialog.js";
|
|
74
|
+
import { usePopover as $o } from "./hooks/use-popover.js";
|
|
74
75
|
import "react";
|
|
75
|
-
import { useScrollAnimation as
|
|
76
|
-
import { useIsPassedPosition as
|
|
77
|
-
import { formatDatePosted as
|
|
78
|
-
import { bytesToSize as
|
|
79
|
-
import { LogLevel as
|
|
80
|
-
import { default as
|
|
76
|
+
import { useScrollAnimation as or } from "./hooks/use-scroll-animation.js";
|
|
77
|
+
import { useIsPassedPosition as ar } from "./hooks/use-is-passed-position.js";
|
|
78
|
+
import { formatDatePosted as fr } from "./utils/dayjs.js";
|
|
79
|
+
import { bytesToSize as sr } from "./utils/bytes-to-size.js";
|
|
80
|
+
import { LogLevel as pr, Logger as ur, createLogger as Sr, logger as dr } from "./utils/logger.js";
|
|
81
|
+
import { default as ir } from "dayjs";
|
|
81
82
|
export {
|
|
82
83
|
R as DialogConfirmProvider,
|
|
83
84
|
j as DialogMessageProvider,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
pr as LogLevel,
|
|
86
|
+
ur as Logger,
|
|
87
|
+
go as MediaItem,
|
|
87
88
|
t as SAccordion,
|
|
88
89
|
l as SActionOverlay,
|
|
89
90
|
m as SAutocomplete,
|
|
@@ -92,18 +93,18 @@ export {
|
|
|
92
93
|
i as SButton,
|
|
93
94
|
g as SButtonLink,
|
|
94
95
|
T as SCarousel,
|
|
95
|
-
|
|
96
|
+
ho as SCategoryCard,
|
|
96
97
|
P as SChatInput,
|
|
97
98
|
b as SChatMessage,
|
|
98
99
|
I as SCheckbox,
|
|
99
100
|
F as SChip,
|
|
100
101
|
w as SChips,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
y as SCommentMessage,
|
|
103
|
+
je as SCopilotKitProvider,
|
|
104
|
+
io as SCopyableText,
|
|
104
105
|
E as SDataTable,
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
$e as SDatePicker,
|
|
107
|
+
Ze as SDateTimePicker,
|
|
107
108
|
_ as SDialog,
|
|
108
109
|
G as SDialogConfirm,
|
|
109
110
|
K as SDialogMessage,
|
|
@@ -113,63 +114,64 @@ export {
|
|
|
113
114
|
re as SFileDropzone,
|
|
114
115
|
te as SFileIcon,
|
|
115
116
|
W as SFlexBox,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
Re as SForm,
|
|
118
|
+
co as SGallery,
|
|
119
|
+
fo as SGlowButton,
|
|
120
|
+
ao as SGradientIcon,
|
|
120
121
|
le as SI18nProvider,
|
|
121
122
|
me as SIconButton,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
Lo as SImageComparison,
|
|
124
|
+
Co as SImageModal,
|
|
125
|
+
Do as SItemNotFound,
|
|
125
126
|
ue as SLabel,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
Jo as SLanguagePopover,
|
|
128
|
+
Qo as SLanguageSwitcher,
|
|
129
|
+
vo as SLazyImage,
|
|
130
|
+
oo as SLocalizationProvider,
|
|
131
|
+
so as SMovingBorder,
|
|
131
132
|
de as SMultiSelect,
|
|
132
133
|
ie as SNoSsr,
|
|
133
134
|
ge as SOverlayScrollbar,
|
|
134
135
|
Pe as SPagination,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
ko as SRadialPulseAnimate,
|
|
137
|
+
Bo as SRating,
|
|
138
|
+
Ao as SReview,
|
|
139
|
+
po as SScrollReveal,
|
|
140
|
+
Xo as SScrollToTop,
|
|
140
141
|
be as SSelect,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
Go as
|
|
150
|
-
|
|
142
|
+
ye as SSelectList,
|
|
143
|
+
Me as SSkeleton,
|
|
144
|
+
Ne as SSmartTextField,
|
|
145
|
+
we as SSnackbarMessage,
|
|
146
|
+
So as SSpotlightCursor,
|
|
147
|
+
Ve as SStripeCVC,
|
|
148
|
+
qe as SStripeExpiry,
|
|
149
|
+
He as SStripeNumber,
|
|
150
|
+
Go as STab,
|
|
151
|
+
Oo as STabPanel,
|
|
152
|
+
zo as STabs,
|
|
151
153
|
M as STextEditor,
|
|
152
154
|
Te as STextField,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
Ko as STextShimmer,
|
|
156
|
+
Fe as STextTruncation,
|
|
157
|
+
Ue as SThemeProvider,
|
|
158
|
+
Xe as SThemeSwitch,
|
|
159
|
+
Ie as STip,
|
|
158
160
|
Y as STwoPaneLayout,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
qo as STypewriterText,
|
|
162
|
+
Ae as SnackbarMessageProvider,
|
|
163
|
+
Je as StripeTextField,
|
|
164
|
+
sr as bytesToSize,
|
|
165
|
+
Sr as createLogger,
|
|
166
|
+
ir as dayjs,
|
|
167
|
+
Uo as defaultLanguageOptions,
|
|
168
|
+
fr as formatDatePosted,
|
|
169
|
+
dr as logger,
|
|
170
|
+
Zo as useDialog,
|
|
169
171
|
N as useDialogConfirm,
|
|
170
172
|
V as useDialogMessage,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
ar as useIsPassedPosition,
|
|
174
|
+
$o as usePopover,
|
|
175
|
+
or as useScrollAnimation,
|
|
176
|
+
Ee as useSnackbarMessage
|
|
175
177
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SSelectListItem<T = any> {
|
|
3
|
+
id: string;
|
|
4
|
+
data: T;
|
|
5
|
+
}
|
|
6
|
+
export interface SSelectListProps<T = any> {
|
|
7
|
+
/**
|
|
8
|
+
* Array of items to render
|
|
9
|
+
*/
|
|
10
|
+
items: SSelectListItem<T>[];
|
|
11
|
+
/**
|
|
12
|
+
* ID of the currently selected item
|
|
13
|
+
*/
|
|
14
|
+
selectedId: string;
|
|
15
|
+
/**
|
|
16
|
+
* Callback when an item is selected
|
|
17
|
+
*/
|
|
18
|
+
onSelect: (id: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Function to render the content of each item
|
|
21
|
+
*/
|
|
22
|
+
renderItem: (item: SSelectListItem<T>, selected: boolean) => React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Optional function to render content below the selected item
|
|
25
|
+
*/
|
|
26
|
+
renderBelow?: (item: SSelectListItem<T>) => React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to show a radio button (default: true)
|
|
29
|
+
*/
|
|
30
|
+
showRadio?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const SSelectList: <T>({ items, selectedId, onSelect, renderItem, renderBelow, showRadio, }: SSelectListProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default SSelectList;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { j as r } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { styled as p, Box as i, Stack as x, Radio as g, Collapse as j } from "@mui/material";
|
|
3
|
+
const u = p(i, {
|
|
4
|
+
shouldForwardProp: (s) => s !== "selected"
|
|
5
|
+
})(({ theme: s, selected: n }) => ({
|
|
6
|
+
display: "flex",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
justifyContent: "space-between",
|
|
9
|
+
width: "100%",
|
|
10
|
+
borderRadius: 8,
|
|
11
|
+
padding: s.spacing(1),
|
|
12
|
+
paddingLeft: s.spacing(2),
|
|
13
|
+
paddingRight: s.spacing(2),
|
|
14
|
+
border: "1px solid",
|
|
15
|
+
cursor: "pointer",
|
|
16
|
+
borderColor: n ? (s.vars || s).palette.primary.dark : (s.vars || s).palette.divider
|
|
17
|
+
})), b = ({
|
|
18
|
+
items: s,
|
|
19
|
+
selectedId: n,
|
|
20
|
+
onSelect: t,
|
|
21
|
+
renderItem: o,
|
|
22
|
+
renderBelow: a,
|
|
23
|
+
showRadio: l = !0
|
|
24
|
+
}) => /* @__PURE__ */ r.jsx(x, { spacing: 2, children: s.map((d) => {
|
|
25
|
+
const e = d.id === n, c = a && e;
|
|
26
|
+
return /* @__PURE__ */ r.jsxs(i, { children: [
|
|
27
|
+
/* @__PURE__ */ r.jsxs(u, { selected: e, onClick: () => t(d.id), children: [
|
|
28
|
+
/* @__PURE__ */ r.jsx(
|
|
29
|
+
i,
|
|
30
|
+
{
|
|
31
|
+
sx: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
gap: 2,
|
|
35
|
+
flex: 1,
|
|
36
|
+
borderRadius: 8
|
|
37
|
+
},
|
|
38
|
+
children: o(d, e)
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
l && /* @__PURE__ */ r.jsx(g, { checked: e })
|
|
42
|
+
] }),
|
|
43
|
+
c && /* @__PURE__ */ r.jsx(j, { in: e, children: /* @__PURE__ */ r.jsx(i, { mt: 2, children: a(d) }) })
|
|
44
|
+
] }, d.id);
|
|
45
|
+
}) });
|
|
46
|
+
export {
|
|
47
|
+
b as default
|
|
48
|
+
};
|