@umami/react-zen 0.39.0 → 0.40.0
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/index.css +113 -25
- package/dist/index.d.ts +8 -15
- package/dist/index.js +115 -127
- package/dist/index.mjs +115 -127
- package/package.json +2 -2
- package/styles.css +113 -25
package/dist/index.mjs
CHANGED
|
@@ -30312,17 +30312,24 @@ var import_classnames14 = __toESM(require_classnames());
|
|
|
30312
30312
|
var import_classnames13 = __toESM(require_classnames());
|
|
30313
30313
|
|
|
30314
30314
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/Dialog.module.css
|
|
30315
|
-
var Dialog_default = { "dialog": "
|
|
30315
|
+
var Dialog_default = { "dialog": "Dialog_dialog__OTEwM", "title": "Dialog_title__MTE4N", "sheet": "Dialog_sheet__MWQ0Z" };
|
|
30316
30316
|
|
|
30317
30317
|
// src/components/Dialog.tsx
|
|
30318
30318
|
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
30319
|
-
function Dialog({ title, children, className, ...props }) {
|
|
30320
|
-
return /* @__PURE__ */ jsx20(
|
|
30321
|
-
|
|
30322
|
-
|
|
30323
|
-
|
|
30324
|
-
|
|
30325
|
-
|
|
30319
|
+
function Dialog({ title, variant, children, className, ...props }) {
|
|
30320
|
+
return /* @__PURE__ */ jsx20(
|
|
30321
|
+
$de32f1b87079253c$export$3ddf2d174ce01153,
|
|
30322
|
+
{
|
|
30323
|
+
...props,
|
|
30324
|
+
className: (0, import_classnames13.default)(Dialog_default.dialog, variant && Dialog_default[variant], className),
|
|
30325
|
+
children: (dialogProps) => {
|
|
30326
|
+
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
30327
|
+
title && /* @__PURE__ */ jsx20("div", { className: Dialog_default.title, children: title }),
|
|
30328
|
+
typeof children === "function" ? children(dialogProps) : children
|
|
30329
|
+
] });
|
|
30330
|
+
}
|
|
30331
|
+
}
|
|
30332
|
+
);
|
|
30326
30333
|
}
|
|
30327
30334
|
|
|
30328
30335
|
// src/components/Row.tsx
|
|
@@ -31074,40 +31081,22 @@ function Menu({ items, className, children, ...props }) {
|
|
|
31074
31081
|
var import_classnames36 = __toESM(require_classnames());
|
|
31075
31082
|
|
|
31076
31083
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/Modal.module.css
|
|
31077
|
-
var Modal_default = { "overlay": "
|
|
31084
|
+
var Modal_default = { "overlay": "Modal_overlay__MzYwN", "modal-fade-in": "Modal_modal-fade-in__MDBkZ", "modal": "Modal_modal__ZTRjZ", "left": "Modal_left__NWIxM", "right": "Modal_right__MGNkY", "top": "Modal_top__ZmViY", "bottom": "Modal_bottom__Zjg4M", "fullscreen": "Modal_fullscreen__NmZiM", "center": "Modal_center__ZWFmO", "modal-zoom": "Modal_modal-zoom__MmU0M", "modal-left": "Modal_modal-left__MWY5M", "modal-right": "Modal_modal-right__OWVlM", "modal-top": "Modal_modal-top__NDc4M", "modal-bottom": "Modal_modal-bottom__YTE1Z" };
|
|
31078
31085
|
|
|
31079
31086
|
// src/components/Modal.tsx
|
|
31080
31087
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
31081
|
-
function Modal({
|
|
31082
|
-
|
|
31083
|
-
|
|
31084
|
-
|
|
31085
|
-
|
|
31086
|
-
|
|
31087
|
-
|
|
31088
|
-
|
|
31089
|
-
|
|
31090
|
-
|
|
31091
|
-
}
|
|
31092
|
-
|
|
31093
|
-
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/MobileMenuButton.module.css
|
|
31094
|
-
var MobileMenuButton_default = { "modal": "MobileMenuButton_modal__YjAxN", "dialog": "MobileMenuButton_dialog__Mzc5Y", "content": "MobileMenuButton_content__MjQ3N" };
|
|
31095
|
-
|
|
31096
|
-
// src/components/MobileMenuButton.tsx
|
|
31097
|
-
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
31098
|
-
function MobileMenuButton({ title, children, ...props }) {
|
|
31099
|
-
return /* @__PURE__ */ jsxs26($de32f1b87079253c$export$2e1e1122cf0cba88, { children: [
|
|
31100
|
-
/* @__PURE__ */ jsx48(Button, { variant: "quiet", children: /* @__PURE__ */ jsx48(Icon, { children: /* @__PURE__ */ jsx48(Icons.Menu, {}) }) }),
|
|
31101
|
-
/* @__PURE__ */ jsx48(Modal, { className: MobileMenuButton_default.modal, children: /* @__PURE__ */ jsx48(Dialog, { className: MobileMenuButton_default.dialog, children: ({ close }) => {
|
|
31102
|
-
return /* @__PURE__ */ jsxs26(Grid, { rows: "auto 1fr", height: "100%", width: "100%", children: [
|
|
31103
|
-
/* @__PURE__ */ jsxs26(Row, { justifyContent: "space-between", alignItems: "center", children: [
|
|
31104
|
-
/* @__PURE__ */ jsx48(Text, { size: "3", weight: "bold", children: title }),
|
|
31105
|
-
/* @__PURE__ */ jsx48(Button, { onPress: () => close(), variant: "quiet", children: /* @__PURE__ */ jsx48(Icon, { children: /* @__PURE__ */ jsx48(Icons.Close, {}) }) })
|
|
31106
|
-
] }),
|
|
31107
|
-
/* @__PURE__ */ jsx48(Box, { className: MobileMenuButton_default.content, children })
|
|
31108
|
-
] });
|
|
31109
|
-
} }) })
|
|
31110
|
-
] });
|
|
31088
|
+
function Modal({
|
|
31089
|
+
position = "center",
|
|
31090
|
+
offset,
|
|
31091
|
+
children,
|
|
31092
|
+
className,
|
|
31093
|
+
style = {},
|
|
31094
|
+
...props
|
|
31095
|
+
}) {
|
|
31096
|
+
if (offset) {
|
|
31097
|
+
style[`--modal-offset`] = offset;
|
|
31098
|
+
}
|
|
31099
|
+
return /* @__PURE__ */ jsx47($f3f84453ead64de5$export$8948f78d83984c69, { ...props, className: Modal_default.overlay, style, isDismissable: true, children: /* @__PURE__ */ jsx47($f3f84453ead64de5$export$2b77a92f1a5ad772, { className: (0, import_classnames36.default)(Modal_default.modal, position && Modal_default[position], className), children }) });
|
|
31111
31100
|
}
|
|
31112
31101
|
|
|
31113
31102
|
// src/components/NavigationMenu.tsx
|
|
@@ -31125,14 +31114,14 @@ var useNavigationMenu = store3;
|
|
|
31125
31114
|
var NavigationMenu_default = { "nav": "NavigationMenu_nav__MzRiY", "item": "NavigationMenu_item__YTI0N", "icon": "NavigationMenu_icon__ZDczY" };
|
|
31126
31115
|
|
|
31127
31116
|
// src/components/NavigationMenu.tsx
|
|
31128
|
-
import { jsx as
|
|
31117
|
+
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
31129
31118
|
function NavigationMenu({
|
|
31130
31119
|
showArrow = true,
|
|
31131
31120
|
className,
|
|
31132
31121
|
children,
|
|
31133
31122
|
...props
|
|
31134
31123
|
}) {
|
|
31135
|
-
return /* @__PURE__ */
|
|
31124
|
+
return /* @__PURE__ */ jsx48("div", { ...props, className: (0, import_classnames37.default)(NavigationMenu_default.nav, className), children });
|
|
31136
31125
|
}
|
|
31137
31126
|
function NavigationMenuItem({
|
|
31138
31127
|
label,
|
|
@@ -31142,15 +31131,15 @@ function NavigationMenuItem({
|
|
|
31142
31131
|
}) {
|
|
31143
31132
|
const { activeMenu } = useNavigationMenu();
|
|
31144
31133
|
if (label) {
|
|
31145
|
-
return /* @__PURE__ */
|
|
31146
|
-
/* @__PURE__ */
|
|
31147
|
-
/* @__PURE__ */
|
|
31148
|
-
/* @__PURE__ */
|
|
31134
|
+
return /* @__PURE__ */ jsxs26(HoverTrigger, { isOpen: activeMenu === label, onHoverStart: () => setActiveMenu(label), children: [
|
|
31135
|
+
/* @__PURE__ */ jsxs26("div", { ...props, className: (0, import_classnames37.default)(NavigationMenu_default.item, className), children: [
|
|
31136
|
+
/* @__PURE__ */ jsx48(Text, { children: label }),
|
|
31137
|
+
/* @__PURE__ */ jsx48(Icon, { rotate: 90, size: "xs", className: NavigationMenu_default.icon, children: /* @__PURE__ */ jsx48(Icons.Chevron, {}) })
|
|
31149
31138
|
] }),
|
|
31150
31139
|
children
|
|
31151
31140
|
] });
|
|
31152
31141
|
}
|
|
31153
|
-
return /* @__PURE__ */
|
|
31142
|
+
return /* @__PURE__ */ jsx48("div", { ...props, className: (0, import_classnames37.default)(NavigationMenu_default.item, className), children });
|
|
31154
31143
|
}
|
|
31155
31144
|
|
|
31156
31145
|
// src/components/PasswordField.tsx
|
|
@@ -31161,17 +31150,17 @@ var import_classnames38 = __toESM(require_classnames());
|
|
|
31161
31150
|
var PasswordField_default = { "icon": "PasswordField_icon__NDMyZ" };
|
|
31162
31151
|
|
|
31163
31152
|
// src/components/PasswordField.tsx
|
|
31164
|
-
import { jsx as
|
|
31153
|
+
import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
31165
31154
|
var PasswordField = forwardRef6(
|
|
31166
31155
|
({ label, className, ...props }, ref) => {
|
|
31167
31156
|
const [show, setShow] = useState13(false);
|
|
31168
31157
|
const type = show ? "text" : "password";
|
|
31169
31158
|
const handleShowPassword = () => setShow((state) => !state);
|
|
31170
|
-
return /* @__PURE__ */
|
|
31171
|
-
label && /* @__PURE__ */
|
|
31172
|
-
/* @__PURE__ */
|
|
31173
|
-
/* @__PURE__ */
|
|
31174
|
-
/* @__PURE__ */
|
|
31159
|
+
return /* @__PURE__ */ jsxs27($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, ref, className: (0, import_classnames38.default)(input_default.field, className), children: [
|
|
31160
|
+
label && /* @__PURE__ */ jsx49(Label, { children: label }),
|
|
31161
|
+
/* @__PURE__ */ jsxs27("div", { className: input_default.row, children: [
|
|
31162
|
+
/* @__PURE__ */ jsx49($3985021b0ad6602f$export$f5b8910cec6cf069, { type, className: input_default.input }),
|
|
31163
|
+
/* @__PURE__ */ jsx49(Icon, { onClick: handleShowPassword, className: (0, import_classnames38.default)(PasswordField_default.icon, input_default.icon), children: show ? /* @__PURE__ */ jsx49(Icons.EyeSlash, {}) : /* @__PURE__ */ jsx49(Icons.Eye, {}) })
|
|
31175
31164
|
] })
|
|
31176
31165
|
] });
|
|
31177
31166
|
}
|
|
@@ -31184,12 +31173,12 @@ var import_classnames39 = __toESM(require_classnames());
|
|
|
31184
31173
|
var ProgressBar_default = { "progressbar": "ProgressBar_progressbar__MTQwN", "track": "ProgressBar_track__YTM0O", "fill": "ProgressBar_fill__ZTkyN", "value": "ProgressBar_value__YTU3N" };
|
|
31185
31174
|
|
|
31186
31175
|
// src/components/ProgressBar.tsx
|
|
31187
|
-
import { Fragment as Fragment6, jsx as
|
|
31176
|
+
import { Fragment as Fragment6, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
31188
31177
|
function ProgressBar({ className, showValue, ...props }) {
|
|
31189
|
-
return /* @__PURE__ */
|
|
31190
|
-
return /* @__PURE__ */
|
|
31191
|
-
/* @__PURE__ */
|
|
31192
|
-
showValue && /* @__PURE__ */
|
|
31178
|
+
return /* @__PURE__ */ jsx50($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames39.default)(ProgressBar_default.progressbar, className), children: ({ percentage = 0, valueText }) => {
|
|
31179
|
+
return /* @__PURE__ */ jsxs28(Fragment6, { children: [
|
|
31180
|
+
/* @__PURE__ */ jsx50("div", { className: ProgressBar_default.track, children: /* @__PURE__ */ jsx50("div", { className: ProgressBar_default.fill, style: { width: `${percentage}%` } }) }),
|
|
31181
|
+
showValue && /* @__PURE__ */ jsx50("div", { className: ProgressBar_default.value, children: valueText })
|
|
31193
31182
|
] });
|
|
31194
31183
|
} });
|
|
31195
31184
|
}
|
|
@@ -31201,16 +31190,16 @@ var import_classnames40 = __toESM(require_classnames());
|
|
|
31201
31190
|
var ProgressCircle_default = { "progresscircle": "ProgressCircle_progresscircle__NTQ3N", "track": "ProgressCircle_track__Mjk3Y", "fill": "ProgressCircle_fill__OWJlY", "value": "ProgressCircle_value__NzQ5Y" };
|
|
31202
31191
|
|
|
31203
31192
|
// src/components/ProgressCircle.tsx
|
|
31204
|
-
import { Fragment as Fragment7, jsx as
|
|
31193
|
+
import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
31205
31194
|
function ProgressCircle({ className, showValue, ...props }) {
|
|
31206
|
-
return /* @__PURE__ */
|
|
31195
|
+
return /* @__PURE__ */ jsx51($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames40.default)(ProgressCircle_default.progresscircle, className), children: ({ percentage = 0, valueText }) => {
|
|
31207
31196
|
const radius = 45;
|
|
31208
31197
|
const circumference = radius * 2 * Math.PI;
|
|
31209
31198
|
const offset = circumference - percentage / 100 * circumference;
|
|
31210
|
-
return /* @__PURE__ */
|
|
31211
|
-
/* @__PURE__ */
|
|
31212
|
-
/* @__PURE__ */
|
|
31213
|
-
/* @__PURE__ */
|
|
31199
|
+
return /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
31200
|
+
/* @__PURE__ */ jsxs29("svg", { viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
31201
|
+
/* @__PURE__ */ jsx51("circle", { className: ProgressCircle_default.track, cx: "50", cy: "50", r: "45" }),
|
|
31202
|
+
/* @__PURE__ */ jsx51(
|
|
31214
31203
|
"circle",
|
|
31215
31204
|
{
|
|
31216
31205
|
className: ProgressCircle_default.fill,
|
|
@@ -31222,7 +31211,7 @@ function ProgressCircle({ className, showValue, ...props }) {
|
|
|
31222
31211
|
}
|
|
31223
31212
|
)
|
|
31224
31213
|
] }),
|
|
31225
|
-
showValue && /* @__PURE__ */
|
|
31214
|
+
showValue && /* @__PURE__ */ jsx51("label", { className: ProgressCircle_default.value, children: valueText })
|
|
31226
31215
|
] });
|
|
31227
31216
|
} });
|
|
31228
31217
|
}
|
|
@@ -31235,17 +31224,17 @@ var import_classnames41 = __toESM(require_classnames());
|
|
|
31235
31224
|
var RadioGroup_default = { "radiogroup": "RadioGroup_radiogroup__M2FmO", "radio": "RadioGroup_radio__NjdlY" };
|
|
31236
31225
|
|
|
31237
31226
|
// src/components/RadioGroup.tsx
|
|
31238
|
-
import { jsx as
|
|
31227
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
31239
31228
|
var RadioGroup = forwardRef7(
|
|
31240
31229
|
({ label, children, className, ...props }, ref) => {
|
|
31241
|
-
return /* @__PURE__ */
|
|
31242
|
-
label && /* @__PURE__ */
|
|
31230
|
+
return /* @__PURE__ */ jsxs30($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames41.default)(RadioGroup_default.radiogroup, className), children: [
|
|
31231
|
+
label && /* @__PURE__ */ jsx52(Label, { children: label }),
|
|
31243
31232
|
children
|
|
31244
31233
|
] });
|
|
31245
31234
|
}
|
|
31246
31235
|
);
|
|
31247
31236
|
function Radio({ children, className, ...props }) {
|
|
31248
|
-
return /* @__PURE__ */
|
|
31237
|
+
return /* @__PURE__ */ jsx52($b6c3ddc6086f204d$export$d7b12c4107be0d61, { ...props, className: (0, import_classnames41.default)(RadioGroup_default.radio, className), children });
|
|
31249
31238
|
}
|
|
31250
31239
|
|
|
31251
31240
|
// src/components/SearchField.tsx
|
|
@@ -31256,7 +31245,7 @@ var import_classnames42 = __toESM(require_classnames());
|
|
|
31256
31245
|
var SearchField_default = { "search": "SearchField_search__MmNlZ", "input": "SearchField_input__NTAwN", "close": "SearchField_close__NzZiM" };
|
|
31257
31246
|
|
|
31258
31247
|
// src/components/SearchField.tsx
|
|
31259
|
-
import { Fragment as Fragment8, jsx as
|
|
31248
|
+
import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
31260
31249
|
var SearchField = forwardRef8(
|
|
31261
31250
|
({ label, value, delay = 0, onSearch, className, ...props }, ref) => {
|
|
31262
31251
|
const [search, setSearch] = useState14(value ?? "");
|
|
@@ -31277,24 +31266,24 @@ var SearchField = forwardRef8(
|
|
|
31277
31266
|
onSearch?.(searchValue);
|
|
31278
31267
|
}
|
|
31279
31268
|
}, [searchValue, delay, onSearch]);
|
|
31280
|
-
return /* @__PURE__ */
|
|
31281
|
-
return /* @__PURE__ */
|
|
31282
|
-
label && /* @__PURE__ */
|
|
31283
|
-
/* @__PURE__ */
|
|
31284
|
-
/* @__PURE__ */
|
|
31285
|
-
/* @__PURE__ */
|
|
31269
|
+
return /* @__PURE__ */ jsx53($440f4836bcb56932$export$b94867ecbd698f21, { ...props, ref, className: (0, import_classnames42.default)(input_default.field, className), children: ({ state }) => {
|
|
31270
|
+
return /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
31271
|
+
label && /* @__PURE__ */ jsx53(Label, { children: label }),
|
|
31272
|
+
/* @__PURE__ */ jsxs31("div", { className: input_default.row, children: [
|
|
31273
|
+
/* @__PURE__ */ jsx53(Icons.MagnifyingGlass, { className: (0, import_classnames42.default)(SearchField_default.search, input_default.icon) }),
|
|
31274
|
+
/* @__PURE__ */ jsx53(
|
|
31286
31275
|
$3985021b0ad6602f$export$f5b8910cec6cf069,
|
|
31287
31276
|
{
|
|
31288
31277
|
className: (0, import_classnames42.default)(SearchField_default.input, input_default.input),
|
|
31289
31278
|
onChange: handleChange
|
|
31290
31279
|
}
|
|
31291
31280
|
),
|
|
31292
|
-
state.value && /* @__PURE__ */
|
|
31281
|
+
state.value && /* @__PURE__ */ jsx53(
|
|
31293
31282
|
$d2b4bc8c273e7be6$export$353f5b6fc5456de1,
|
|
31294
31283
|
{
|
|
31295
31284
|
className: (0, import_classnames42.default)(SearchField_default.close, input_default.icon),
|
|
31296
31285
|
onPress: resetSearch,
|
|
31297
|
-
children: /* @__PURE__ */
|
|
31286
|
+
children: /* @__PURE__ */ jsx53(Icon, { children: /* @__PURE__ */ jsx53(Icons.Close, {}) })
|
|
31298
31287
|
}
|
|
31299
31288
|
)
|
|
31300
31289
|
] })
|
|
@@ -31311,7 +31300,7 @@ import { forwardRef as forwardRef9 } from "react";
|
|
|
31311
31300
|
var Select_default = { "button": "Select_button__YTM3Z", "list": "Select_list__MjJiN", "icon": "Select_icon__NzlhY" };
|
|
31312
31301
|
|
|
31313
31302
|
// src/components/Select.tsx
|
|
31314
|
-
import { jsx as
|
|
31303
|
+
import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
31315
31304
|
var Select = forwardRef9(
|
|
31316
31305
|
({
|
|
31317
31306
|
children,
|
|
@@ -31327,7 +31316,7 @@ var Select = forwardRef9(
|
|
|
31327
31316
|
onSelectionChange?.(e);
|
|
31328
31317
|
onChange?.(e);
|
|
31329
31318
|
};
|
|
31330
|
-
return /* @__PURE__ */
|
|
31319
|
+
return /* @__PURE__ */ jsxs32(
|
|
31331
31320
|
$82d7e5349645de74$export$ef9b1a59e592288f,
|
|
31332
31321
|
{
|
|
31333
31322
|
...props,
|
|
@@ -31335,12 +31324,12 @@ var Select = forwardRef9(
|
|
|
31335
31324
|
className: (0, import_classnames43.default)(input_default.field, className),
|
|
31336
31325
|
onSelectionChange: handleChange,
|
|
31337
31326
|
children: [
|
|
31338
|
-
label && /* @__PURE__ */
|
|
31339
|
-
/* @__PURE__ */
|
|
31340
|
-
/* @__PURE__ */
|
|
31341
|
-
/* @__PURE__ */
|
|
31327
|
+
label && /* @__PURE__ */ jsx54(Label, { children: label }),
|
|
31328
|
+
/* @__PURE__ */ jsx54($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: (0, import_classnames43.default)(input_default.input, className), children: /* @__PURE__ */ jsxs32(Row, { justifyContent: "space-between", gap: "3", children: [
|
|
31329
|
+
/* @__PURE__ */ jsx54($82d7e5349645de74$export$e288731fd71264f0, {}),
|
|
31330
|
+
/* @__PURE__ */ jsx54("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx54(Icon, { rotate: 90, size: "xs", className: input_default.icon, children: /* @__PURE__ */ jsx54(Icons.Chevron, {}) }) })
|
|
31342
31331
|
] }) }),
|
|
31343
|
-
/* @__PURE__ */
|
|
31332
|
+
/* @__PURE__ */ jsx54(Popover, { children: /* @__PURE__ */ jsx54(List, { items, className: Select_default.list, children }) })
|
|
31344
31333
|
]
|
|
31345
31334
|
}
|
|
31346
31335
|
);
|
|
@@ -31355,18 +31344,18 @@ var import_classnames44 = __toESM(require_classnames());
|
|
|
31355
31344
|
var Slider_default = { "slider": "Slider_slider__ODQ1M", "header": "Slider_header__NmYzN", "track": "Slider_track__Y2M4O", "fill": "Slider_fill__MWM4N", "thumb": "Slider_thumb__NGU2Z" };
|
|
31356
31345
|
|
|
31357
31346
|
// src/components/Slider.tsx
|
|
31358
|
-
import { Fragment as Fragment9, jsx as
|
|
31347
|
+
import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
31359
31348
|
var Slider = forwardRef10(
|
|
31360
31349
|
({ className, showValue = true, label, ...props }, ref) => {
|
|
31361
|
-
return /* @__PURE__ */
|
|
31362
|
-
/* @__PURE__ */
|
|
31363
|
-
label && /* @__PURE__ */
|
|
31364
|
-
showValue && /* @__PURE__ */
|
|
31350
|
+
return /* @__PURE__ */ jsxs33($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames44.default)(Slider_default.slider, className), children: [
|
|
31351
|
+
/* @__PURE__ */ jsxs33("div", { className: Slider_default.header, children: [
|
|
31352
|
+
label && /* @__PURE__ */ jsx55(Label, { className: Slider_default.label, children: label }),
|
|
31353
|
+
showValue && /* @__PURE__ */ jsx55($6f909507e6374d18$export$a590f758a961cb5b, { className: Slider_default.output })
|
|
31365
31354
|
] }),
|
|
31366
|
-
/* @__PURE__ */
|
|
31355
|
+
/* @__PURE__ */ jsx55($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
|
|
31367
31356
|
const isHorizontal = state.orientation === "horizontal";
|
|
31368
|
-
return /* @__PURE__ */
|
|
31369
|
-
/* @__PURE__ */
|
|
31357
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
31358
|
+
/* @__PURE__ */ jsx55(
|
|
31370
31359
|
"div",
|
|
31371
31360
|
{
|
|
31372
31361
|
className: Slider_default.fill,
|
|
@@ -31375,7 +31364,7 @@ var Slider = forwardRef10(
|
|
|
31375
31364
|
}
|
|
31376
31365
|
}
|
|
31377
31366
|
),
|
|
31378
|
-
/* @__PURE__ */
|
|
31367
|
+
/* @__PURE__ */ jsx55($6f909507e6374d18$export$2c1b491743890dec, { className: Slider_default.thumb })
|
|
31379
31368
|
] });
|
|
31380
31369
|
} })
|
|
31381
31370
|
] });
|
|
@@ -31389,11 +31378,11 @@ var import_classnames45 = __toESM(require_classnames());
|
|
|
31389
31378
|
var StatusLight_default = { "statuslight": "StatusLight_statuslight__NGIzM", "status": "StatusLight_status__NjQ5O", "bg": "StatusLight_bg__MDIxM", "success": "StatusLight_success__NGRjZ", "warning": "StatusLight_warning__MTFhZ", "error": "StatusLight_error__NzBjO", "active": "StatusLight_active__YTJhM", "inactive": "StatusLight_inactive__ZDZmN" };
|
|
31390
31379
|
|
|
31391
31380
|
// src/components/StatusLight.tsx
|
|
31392
|
-
import { jsx as
|
|
31381
|
+
import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
31393
31382
|
function StatusLight(props) {
|
|
31394
31383
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
31395
|
-
return /* @__PURE__ */
|
|
31396
|
-
/* @__PURE__ */
|
|
31384
|
+
return /* @__PURE__ */ jsxs34("div", { ...domProps, className: (0, import_classnames45.default)(StatusLight_default.statuslight, className), children: [
|
|
31385
|
+
/* @__PURE__ */ jsx56("div", { className: StatusLight_default.bg, children: /* @__PURE__ */ jsx56(
|
|
31397
31386
|
"div",
|
|
31398
31387
|
{
|
|
31399
31388
|
className: (0, import_classnames45.default)(StatusLight_default.status, StatusLight_default[variant]),
|
|
@@ -31412,13 +31401,13 @@ var import_classnames46 = __toESM(require_classnames());
|
|
|
31412
31401
|
var Switch_default = { "switch": "Switch_switch__YzA5O", "track": "Switch_track__MTM0M", "knob": "Switch_knob__OWM5N" };
|
|
31413
31402
|
|
|
31414
31403
|
// src/components/Switch.tsx
|
|
31415
|
-
import { Fragment as Fragment10, jsx as
|
|
31404
|
+
import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
31416
31405
|
var Switch = forwardRef11(
|
|
31417
31406
|
({ label, children, className, ...props }, ref) => {
|
|
31418
31407
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
31419
|
-
return /* @__PURE__ */
|
|
31420
|
-
label && /* @__PURE__ */
|
|
31421
|
-
/* @__PURE__ */
|
|
31408
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
31409
|
+
label && /* @__PURE__ */ jsx57(Label, { children: label }),
|
|
31410
|
+
/* @__PURE__ */ jsxs35(
|
|
31422
31411
|
$8e59e948500a8fe1$export$b5d5cf8927ab7262,
|
|
31423
31412
|
{
|
|
31424
31413
|
...props,
|
|
@@ -31426,7 +31415,7 @@ var Switch = forwardRef11(
|
|
|
31426
31415
|
ref,
|
|
31427
31416
|
className: (0, import_classnames46.default)(Switch_default.switch, className),
|
|
31428
31417
|
children: [
|
|
31429
|
-
/* @__PURE__ */
|
|
31418
|
+
/* @__PURE__ */ jsx57("div", { className: Switch_default.track, children: /* @__PURE__ */ jsx57("div", { className: Switch_default.knob }) }),
|
|
31430
31419
|
children
|
|
31431
31420
|
]
|
|
31432
31421
|
}
|
|
@@ -31439,18 +31428,18 @@ var Switch = forwardRef11(
|
|
|
31439
31428
|
var Tabs_default = { "tabs": "Tabs_tabs__ZmM4Z", "list": "Tabs_list__MGM4O", "quiet": "Tabs_quiet__YmI3N", "tab": "Tabs_tab__NWEyN" };
|
|
31440
31429
|
|
|
31441
31430
|
// src/components/Tabs.tsx
|
|
31442
|
-
import { jsx as
|
|
31431
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
31443
31432
|
function Tabs({ children, ...props }) {
|
|
31444
|
-
return /* @__PURE__ */
|
|
31433
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$b2539bed5023c21c, { ...props, className: Tabs_default.tabs, children });
|
|
31445
31434
|
}
|
|
31446
31435
|
function TabList({ children, ...props }) {
|
|
31447
|
-
return /* @__PURE__ */
|
|
31436
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$e51a686c67fdaa2d, { ...props, className: Tabs_default.list, children });
|
|
31448
31437
|
}
|
|
31449
31438
|
function Tab({ children, ...props }) {
|
|
31450
|
-
return /* @__PURE__ */
|
|
31439
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$3e41faf802a29e71, { ...props, className: Tabs_default.tab, children });
|
|
31451
31440
|
}
|
|
31452
31441
|
function TabPanel({ children, ...props }) {
|
|
31453
|
-
return /* @__PURE__ */
|
|
31442
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$3d96ec278d3efce4, { ...props, className: Tabs_default.panel, children });
|
|
31454
31443
|
}
|
|
31455
31444
|
|
|
31456
31445
|
// src/components/TextArea.tsx
|
|
@@ -31461,17 +31450,17 @@ import { forwardRef as forwardRef12 } from "react";
|
|
|
31461
31450
|
var TextArea_default = { "textarea": "TextArea_textarea__YzRiM", "resize-none": "TextArea_resize-none__ZTljZ", "resize-horizontal": "TextArea_resize-horizontal__NzgyN", "resize-vertical": "TextArea_resize-vertical__MTIxZ" };
|
|
31462
31451
|
|
|
31463
31452
|
// src/components/TextArea.tsx
|
|
31464
|
-
import { jsx as
|
|
31453
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
31465
31454
|
var TextArea = forwardRef12(
|
|
31466
31455
|
({ rows, cols, resize, className, style, children, ...props }, ref) => {
|
|
31467
|
-
return /* @__PURE__ */
|
|
31456
|
+
return /* @__PURE__ */ jsx59(
|
|
31468
31457
|
TextField,
|
|
31469
31458
|
{
|
|
31470
31459
|
...props,
|
|
31471
31460
|
ref,
|
|
31472
31461
|
className: (0, import_classnames47.default)(resize && TextArea_default[`resize-${resize}`]),
|
|
31473
31462
|
asChild: true,
|
|
31474
|
-
children: /* @__PURE__ */
|
|
31463
|
+
children: /* @__PURE__ */ jsx59($216918bed6669f72$export$f5c9f3c2c4054eec, { rows, cols, style: { ...style }, children })
|
|
31475
31464
|
}
|
|
31476
31465
|
);
|
|
31477
31466
|
}
|
|
@@ -31484,7 +31473,7 @@ var import_classnames48 = __toESM(require_classnames());
|
|
|
31484
31473
|
var ThemeButton_default = { "button": "ThemeButton_button__OWVmZ" };
|
|
31485
31474
|
|
|
31486
31475
|
// src/components/ThemeButton.tsx
|
|
31487
|
-
import { jsx as
|
|
31476
|
+
import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
31488
31477
|
function ThemeButton({ className, variant = "quiet", ...props }) {
|
|
31489
31478
|
const { theme, setTheme: setTheme2 } = useTheme();
|
|
31490
31479
|
const transitions = useTransition(theme, {
|
|
@@ -31502,7 +31491,7 @@ function ThemeButton({ className, variant = "quiet", ...props }) {
|
|
|
31502
31491
|
function handleClick() {
|
|
31503
31492
|
setTheme2(theme === "light" ? "dark" : "light");
|
|
31504
31493
|
}
|
|
31505
|
-
return /* @__PURE__ */
|
|
31494
|
+
return /* @__PURE__ */ jsxs36(
|
|
31506
31495
|
Button,
|
|
31507
31496
|
{
|
|
31508
31497
|
...props,
|
|
@@ -31512,7 +31501,7 @@ function ThemeButton({ className, variant = "quiet", ...props }) {
|
|
|
31512
31501
|
children: [
|
|
31513
31502
|
transitions((style, item) => (
|
|
31514
31503
|
// @ts-ignore
|
|
31515
|
-
/* @__PURE__ */
|
|
31504
|
+
/* @__PURE__ */ jsx60(animated.div, { style, children: /* @__PURE__ */ jsx60(Icon, { size: "sm", children: item === "light" ? /* @__PURE__ */ jsx60(Icons.Sun, {}) : /* @__PURE__ */ jsx60(Icons.Moon, {}) }) }, item)
|
|
31516
31505
|
)),
|
|
31517
31506
|
"\xA0"
|
|
31518
31507
|
]
|
|
@@ -31528,13 +31517,13 @@ var import_classnames49 = __toESM(require_classnames());
|
|
|
31528
31517
|
var Toggle_default = { "toggle": "Toggle_toggle__NGNlM" };
|
|
31529
31518
|
|
|
31530
31519
|
// src/components/Toggle.tsx
|
|
31531
|
-
import { Fragment as Fragment11, jsx as
|
|
31520
|
+
import { Fragment as Fragment11, jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
31532
31521
|
var Toggle = forwardRef13(
|
|
31533
31522
|
({ label, children, className, ...props }, ref) => {
|
|
31534
31523
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
31535
|
-
return /* @__PURE__ */
|
|
31536
|
-
label && /* @__PURE__ */
|
|
31537
|
-
/* @__PURE__ */
|
|
31524
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
31525
|
+
label && /* @__PURE__ */ jsx61(Label, { children: label }),
|
|
31526
|
+
/* @__PURE__ */ jsx61(
|
|
31538
31527
|
$efde0372d7a700fe$export$d2b052e7b4be1756,
|
|
31539
31528
|
{
|
|
31540
31529
|
...props,
|
|
@@ -31555,15 +31544,15 @@ var import_classnames50 = __toESM(require_classnames());
|
|
|
31555
31544
|
var ToggleGroup_default = { "group": "ToggleGroup_group__NDAzY", "list": "ToggleGroup_list__ZDEwO", "item": "ToggleGroup_item__N2ZmN" };
|
|
31556
31545
|
|
|
31557
31546
|
// src/components/ToggleGroup.tsx
|
|
31558
|
-
import { jsx as
|
|
31547
|
+
import { jsx as jsx62, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
31559
31548
|
function ToggleGroup({ label, className, children, ...props }) {
|
|
31560
|
-
return /* @__PURE__ */
|
|
31561
|
-
label && /* @__PURE__ */
|
|
31562
|
-
/* @__PURE__ */
|
|
31549
|
+
return /* @__PURE__ */ jsxs38($eaf9e70818b436db$export$67ea30858aaf75e3, { ...props, className: (0, import_classnames50.default)(ToggleGroup_default.group, className), selectionBehavior: "toggle", children: [
|
|
31550
|
+
label && /* @__PURE__ */ jsx62(Label, { children: label }),
|
|
31551
|
+
/* @__PURE__ */ jsx62($eaf9e70818b436db$export$f9fef0f55402315b, { className: ToggleGroup_default.list, children })
|
|
31563
31552
|
] });
|
|
31564
31553
|
}
|
|
31565
31554
|
function ToggleGroupItem({ className, children, ...props }) {
|
|
31566
|
-
return /* @__PURE__ */
|
|
31555
|
+
return /* @__PURE__ */ jsx62($eaf9e70818b436db$export$3288d34c523a1192, { ...props, className: (0, import_classnames50.default)(ToggleGroup_default.item, className), children });
|
|
31567
31556
|
}
|
|
31568
31557
|
|
|
31569
31558
|
// src/components/Tooltip.tsx
|
|
@@ -31573,19 +31562,19 @@ var import_classnames51 = __toESM(require_classnames());
|
|
|
31573
31562
|
var Tooltip_default = { "tooltip": "Tooltip_tooltip__Y2Y2N", "arrow": "Tooltip_arrow__NzgwN", "slide": "Tooltip_slide__ODJjZ" };
|
|
31574
31563
|
|
|
31575
31564
|
// src/components/Tooltip.tsx
|
|
31576
|
-
import { jsx as
|
|
31565
|
+
import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
31577
31566
|
function Tooltip({ children, className, ...props }) {
|
|
31578
|
-
return /* @__PURE__ */
|
|
31579
|
-
/* @__PURE__ */
|
|
31567
|
+
return /* @__PURE__ */ jsxs39($4e3b923658d69c60$export$28c660c63b792dea, { ...props, className: (0, import_classnames51.default)(Tooltip_default.tooltip, className), children: [
|
|
31568
|
+
/* @__PURE__ */ jsx63($44f671af83e7d9e0$export$746d02f47f4d381, { className: Tooltip_default.arrow, children: /* @__PURE__ */ jsx63("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx63("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
31580
31569
|
children
|
|
31581
31570
|
] });
|
|
31582
31571
|
}
|
|
31583
31572
|
|
|
31584
31573
|
// src/components/ZenProvider.tsx
|
|
31585
|
-
import { jsx as
|
|
31574
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
31586
31575
|
function ZenProvider({ children, ...props }) {
|
|
31587
31576
|
const { toast } = props;
|
|
31588
|
-
return /* @__PURE__ */
|
|
31577
|
+
return /* @__PURE__ */ jsx64(ToastProvider, { ...toast, children });
|
|
31589
31578
|
}
|
|
31590
31579
|
export {
|
|
31591
31580
|
Accordion,
|
|
@@ -31631,7 +31620,6 @@ export {
|
|
|
31631
31620
|
Menu,
|
|
31632
31621
|
MenuItem2 as MenuItem,
|
|
31633
31622
|
$3674c52c6b3c5bce$export$27d2ad3c5815583e as MenuTrigger,
|
|
31634
|
-
MobileMenuButton,
|
|
31635
31623
|
Modal,
|
|
31636
31624
|
NavigationMenu,
|
|
31637
31625
|
NavigationMenuItem,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umami/react-zen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "React components built by Umami",
|
|
5
5
|
"author": "Umami <hello@umami.is>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@fontsource/jetbrains-mono": "^5.0.18",
|
|
50
50
|
"@react-spring/web": "^9.7.5",
|
|
51
51
|
"@umami/esbuild-plugin-css-modules": "0.2.0",
|
|
52
|
-
"@umami/shiso": "^0.
|
|
52
|
+
"@umami/shiso": "^0.26.0",
|
|
53
53
|
"classnames": "^2.5.1",
|
|
54
54
|
"dts-bundle": "^0.7.3",
|
|
55
55
|
"glob": "^10.3.10",
|