@umami/react-zen 0.118.0 → 0.120.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 +29 -27
- package/dist/index.js +8 -6
- package/dist/index.mjs +8 -6
- package/package.json +3 -3
- package/styles.css +29 -27
package/dist/index.css
CHANGED
|
@@ -3952,24 +3952,24 @@ body a.Button_button__NDYwM {
|
|
|
3952
3952
|
}
|
|
3953
3953
|
|
|
3954
3954
|
/* virtual-css:css:0fb02723d81c5960ed149d3d9f58f1ba */
|
|
3955
|
-
.
|
|
3955
|
+
.List_list__ZTQ5M {
|
|
3956
3956
|
display: grid;
|
|
3957
3957
|
outline: none;
|
|
3958
3958
|
overflow: auto;
|
|
3959
3959
|
gap: var(--spacing-1);
|
|
3960
3960
|
}
|
|
3961
|
-
.
|
|
3961
|
+
.List_separator__Zjk5Y {
|
|
3962
3962
|
border-bottom: var(--border);
|
|
3963
3963
|
}
|
|
3964
|
-
.
|
|
3964
|
+
.List_section__MDgwZ:not(:last-child) {
|
|
3965
3965
|
margin-bottom: var(--spacing-4);
|
|
3966
3966
|
}
|
|
3967
|
-
.
|
|
3967
|
+
.List_header__MjUxO {
|
|
3968
3968
|
font-size: var(--font-size-2);
|
|
3969
3969
|
font-weight: var(--font-weight-bold);
|
|
3970
3970
|
padding: var(--padding);
|
|
3971
3971
|
}
|
|
3972
|
-
.
|
|
3972
|
+
.List_item__NTg2Z {
|
|
3973
3973
|
display: flex;
|
|
3974
3974
|
align-items: center;
|
|
3975
3975
|
justify-content: space-between;
|
|
@@ -3982,28 +3982,27 @@ body a.Button_button__NDYwM {
|
|
|
3982
3982
|
outline: none;
|
|
3983
3983
|
border-radius: var(--border-radius);
|
|
3984
3984
|
}
|
|
3985
|
-
.
|
|
3985
|
+
.List_item__NTg2Z[data-disabled] {
|
|
3986
3986
|
color: var(--font-color-disabled);
|
|
3987
3987
|
}
|
|
3988
|
-
.
|
|
3989
|
-
.
|
|
3988
|
+
.List_item__NTg2Z[data-focus],
|
|
3989
|
+
.List_item__NTg2Z[data-focus-visible] {
|
|
3990
3990
|
background: var(--highlight-color);
|
|
3991
3991
|
}
|
|
3992
|
-
.
|
|
3992
|
+
.List_item__NTg2Z:hover {
|
|
3993
3993
|
background: var(--highlight-color);
|
|
3994
3994
|
}
|
|
3995
|
-
.
|
|
3995
|
+
.List_item__NTg2Z[data-selected] {
|
|
3996
3996
|
font-weight: bold;
|
|
3997
|
-
& .
|
|
3997
|
+
& .List_checkmark__M2M5Y {
|
|
3998
3998
|
display: flex;
|
|
3999
3999
|
justify-content: flex-end;
|
|
4000
|
-
flex: 1;
|
|
4001
4000
|
}
|
|
4002
4001
|
}
|
|
4003
|
-
.
|
|
4002
|
+
.List_checkmark__M2M5Y {
|
|
4004
4003
|
display: none;
|
|
4005
4004
|
}
|
|
4006
|
-
.
|
|
4005
|
+
.List_hideCheckmark__YmNlM .List_checkmark__M2M5Y {
|
|
4007
4006
|
display: none;
|
|
4008
4007
|
}
|
|
4009
4008
|
|
|
@@ -4378,26 +4377,29 @@ body a.Button_button__NDYwM {
|
|
|
4378
4377
|
}
|
|
4379
4378
|
|
|
4380
4379
|
/* virtual-css:css:e3e6aca5943038cfd68ddbab1d1ccf5e */
|
|
4381
|
-
.
|
|
4380
|
+
.RadioGroup_radiogroup__ZDJlY {
|
|
4381
|
+
font-size: var(--font-size);
|
|
4382
|
+
color: var(--font-color);
|
|
4383
|
+
}
|
|
4384
|
+
.RadioGroup_inputs__OTc1Y {
|
|
4382
4385
|
display: flex;
|
|
4383
4386
|
flex-direction: column;
|
|
4384
4387
|
gap: var(--spacing-4);
|
|
4385
|
-
font-size: var(--font-size);
|
|
4386
|
-
color: var(--font-color);
|
|
4387
4388
|
}
|
|
4388
|
-
.
|
|
4389
|
+
.RadioGroup_radiogroup__ZDJlY[data-orientation=vertical] .RadioGroup_inputs__OTc1Y {
|
|
4389
4390
|
flex-direction: column;
|
|
4390
4391
|
}
|
|
4391
|
-
.
|
|
4392
|
+
.RadioGroup_radiogroup__ZDJlY[data-orientation=horizontal] .RadioGroup_inputs__OTc1Y {
|
|
4392
4393
|
flex-direction: row;
|
|
4394
|
+
gap: var(--spacing-6);
|
|
4393
4395
|
}
|
|
4394
|
-
.
|
|
4396
|
+
.RadioGroup_radio__ZDJiM {
|
|
4395
4397
|
display: flex;
|
|
4396
4398
|
align-items: center;
|
|
4397
|
-
gap: var(--
|
|
4399
|
+
gap: var(--gap);
|
|
4398
4400
|
forced-color-adjust: none;
|
|
4399
4401
|
}
|
|
4400
|
-
.
|
|
4402
|
+
.RadioGroup_radio__ZDJiM:before {
|
|
4401
4403
|
content: "";
|
|
4402
4404
|
display: block;
|
|
4403
4405
|
width: 20px;
|
|
@@ -4409,20 +4411,20 @@ body a.Button_button__NDYwM {
|
|
|
4409
4411
|
transition: all 200ms;
|
|
4410
4412
|
box-shadow: var(--box-shadow);
|
|
4411
4413
|
}
|
|
4412
|
-
.
|
|
4414
|
+
.RadioGroup_radio__ZDJiM[data-pressed]:before {
|
|
4413
4415
|
border-color: var(--border-color);
|
|
4414
4416
|
}
|
|
4415
|
-
.
|
|
4417
|
+
.RadioGroup_radio__ZDJiM[data-selected]:before {
|
|
4416
4418
|
border-color: var(--primary-color);
|
|
4417
4419
|
border-width: 7px;
|
|
4418
4420
|
}
|
|
4419
|
-
.
|
|
4421
|
+
.RadioGroup_radio__ZDJiM[data-selected][data-pressed]:before {
|
|
4420
4422
|
border-color: var(--primary-color);
|
|
4421
4423
|
}
|
|
4422
|
-
.
|
|
4424
|
+
.RadioGroup_radio__ZDJiM[data-disabled] {
|
|
4423
4425
|
color: var(--font-color-muted);
|
|
4424
4426
|
}
|
|
4425
|
-
.
|
|
4427
|
+
.RadioGroup_radio__ZDJiM[data-disabled]:before {
|
|
4426
4428
|
background-color: var(--base-color-4);
|
|
4427
4429
|
}
|
|
4428
4430
|
|
package/dist/index.js
CHANGED
|
@@ -26128,12 +26128,14 @@ function FormField({
|
|
|
26128
26128
|
children,
|
|
26129
26129
|
...props
|
|
26130
26130
|
}) {
|
|
26131
|
-
const
|
|
26132
|
-
const {
|
|
26131
|
+
const context = useFormContext();
|
|
26132
|
+
const { formState, control } = context;
|
|
26133
|
+
const controller = useController({ name, control, rules });
|
|
26134
|
+
const { field } = controller;
|
|
26133
26135
|
const errors = formState?.errors || {};
|
|
26134
26136
|
const errorMessage = errors[name]?.message;
|
|
26135
26137
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { ...props, className: (0, import_classnames6.default)(FormField_default.input, className), children: [
|
|
26136
|
-
typeof children === "function" ? children(
|
|
26138
|
+
typeof children === "function" ? children({ context, controller }) : import_react153.Children.map(
|
|
26137
26139
|
children,
|
|
26138
26140
|
(child) => child ? (0, import_react153.cloneElement)(child, { ...field, label: child.props.label || label }) : null
|
|
26139
26141
|
),
|
|
@@ -30973,7 +30975,7 @@ function getHighlightColor(color) {
|
|
|
30973
30975
|
}
|
|
30974
30976
|
|
|
30975
30977
|
// css-modules:E:\dev\umami-react-zen\src\components\List.module.css
|
|
30976
|
-
var List_default = { "list": "
|
|
30978
|
+
var List_default = { "list": "List_list__ZTQ5M", "separator": "List_separator__Zjk5Y", "section": "List_section__MDgwZ", "header": "List_header__MjUxO", "item": "List_item__NTg2Z", "checkmark": "List_checkmark__M2M5Y", "hideCheckmark": "List_hideCheckmark__YmNlM" };
|
|
30977
30979
|
|
|
30978
30980
|
// src/components/List.tsx
|
|
30979
30981
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
@@ -31250,14 +31252,14 @@ function ProgressCircle({ className, showValue, ...props }) {
|
|
|
31250
31252
|
var import_classnames42 = __toESM(require_classnames());
|
|
31251
31253
|
|
|
31252
31254
|
// css-modules:E:\dev\umami-react-zen\src\components\RadioGroup.module.css
|
|
31253
|
-
var RadioGroup_default = { "radiogroup": "
|
|
31255
|
+
var RadioGroup_default = { "radiogroup": "RadioGroup_radiogroup__ZDJlY", "inputs": "RadioGroup_inputs__OTc1Y", "radio": "RadioGroup_radio__ZDJiM" };
|
|
31254
31256
|
|
|
31255
31257
|
// src/components/RadioGroup.tsx
|
|
31256
31258
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
31257
31259
|
function RadioGroup2({ label, children, className, ...props }) {
|
|
31258
31260
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, className: (0, import_classnames42.default)(RadioGroup_default.radiogroup, className), children: [
|
|
31259
31261
|
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Label2, { children: label }),
|
|
31260
|
-
children
|
|
31262
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: RadioGroup_default.inputs, children })
|
|
31261
31263
|
] });
|
|
31262
31264
|
}
|
|
31263
31265
|
function Radio2({ children, className, ...props }) {
|
package/dist/index.mjs
CHANGED
|
@@ -26013,12 +26013,14 @@ function FormField({
|
|
|
26013
26013
|
children,
|
|
26014
26014
|
...props
|
|
26015
26015
|
}) {
|
|
26016
|
-
const
|
|
26017
|
-
const {
|
|
26016
|
+
const context = useFormContext();
|
|
26017
|
+
const { formState, control } = context;
|
|
26018
|
+
const controller = useController({ name, control, rules });
|
|
26019
|
+
const { field } = controller;
|
|
26018
26020
|
const errors = formState?.errors || {};
|
|
26019
26021
|
const errorMessage = errors[name]?.message;
|
|
26020
26022
|
return /* @__PURE__ */ jsxs3("div", { ...props, className: (0, import_classnames6.default)(FormField_default.input, className), children: [
|
|
26021
|
-
typeof children === "function" ? children(
|
|
26023
|
+
typeof children === "function" ? children({ context, controller }) : Children.map(
|
|
26022
26024
|
children,
|
|
26023
26025
|
(child) => child ? cloneElement2(child, { ...field, label: child.props.label || label }) : null
|
|
26024
26026
|
),
|
|
@@ -30858,7 +30860,7 @@ function getHighlightColor(color) {
|
|
|
30858
30860
|
}
|
|
30859
30861
|
|
|
30860
30862
|
// css-modules:E:\dev\umami-react-zen\src\components\List.module.css
|
|
30861
|
-
var List_default = { "list": "
|
|
30863
|
+
var List_default = { "list": "List_list__ZTQ5M", "separator": "List_separator__Zjk5Y", "section": "List_section__MDgwZ", "header": "List_header__MjUxO", "item": "List_item__NTg2Z", "checkmark": "List_checkmark__M2M5Y", "hideCheckmark": "List_hideCheckmark__YmNlM" };
|
|
30862
30864
|
|
|
30863
30865
|
// src/components/List.tsx
|
|
30864
30866
|
import { jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
@@ -31139,14 +31141,14 @@ function ProgressCircle({ className, showValue, ...props }) {
|
|
|
31139
31141
|
var import_classnames42 = __toESM(require_classnames());
|
|
31140
31142
|
|
|
31141
31143
|
// css-modules:E:\dev\umami-react-zen\src\components\RadioGroup.module.css
|
|
31142
|
-
var RadioGroup_default = { "radiogroup": "
|
|
31144
|
+
var RadioGroup_default = { "radiogroup": "RadioGroup_radiogroup__ZDJlY", "inputs": "RadioGroup_inputs__OTc1Y", "radio": "RadioGroup_radio__ZDJiM" };
|
|
31143
31145
|
|
|
31144
31146
|
// src/components/RadioGroup.tsx
|
|
31145
31147
|
import { jsx as jsx52, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
31146
31148
|
function RadioGroup2({ label, children, className, ...props }) {
|
|
31147
31149
|
return /* @__PURE__ */ jsxs28($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, className: (0, import_classnames42.default)(RadioGroup_default.radiogroup, className), children: [
|
|
31148
31150
|
label && /* @__PURE__ */ jsx52(Label2, { children: label }),
|
|
31149
|
-
children
|
|
31151
|
+
/* @__PURE__ */ jsx52("div", { className: RadioGroup_default.inputs, children })
|
|
31150
31152
|
] });
|
|
31151
31153
|
}
|
|
31152
31154
|
function Radio2({ children, className, ...props }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umami/react-zen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.120.0",
|
|
4
4
|
"description": "Modern, minimalist React component library",
|
|
5
5
|
"author": "Umami <hello@umami.is>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"build": "next build",
|
|
25
25
|
"start": "next start",
|
|
26
26
|
"lint": "next lint",
|
|
27
|
+
"icons": "svgr ./src/assets --out-dir src/components/svg --typescript",
|
|
27
28
|
"esbuild": "node esbuild.mjs",
|
|
28
29
|
"rollup": "rollup -c",
|
|
29
30
|
"css": "node css.mjs",
|
|
@@ -66,8 +67,7 @@
|
|
|
66
67
|
"@rollup/plugin-alias": "^5.1.0",
|
|
67
68
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
68
69
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
69
|
-
"@svgr/
|
|
70
|
-
"@svgr/webpack": "^8.1.0",
|
|
70
|
+
"@svgr/cli": "^8.1.0",
|
|
71
71
|
"@types/mdx": "^2.0.11",
|
|
72
72
|
"@types/node": "^22.15.21",
|
|
73
73
|
"@types/react": "^19.1.5",
|
package/styles.css
CHANGED
|
@@ -4270,24 +4270,24 @@ body a.Button_button__NDYwM {
|
|
|
4270
4270
|
}
|
|
4271
4271
|
|
|
4272
4272
|
/* virtual-css:css:0fb02723d81c5960ed149d3d9f58f1ba */
|
|
4273
|
-
.
|
|
4273
|
+
.List_list__ZTQ5M {
|
|
4274
4274
|
display: grid;
|
|
4275
4275
|
outline: none;
|
|
4276
4276
|
overflow: auto;
|
|
4277
4277
|
gap: var(--spacing-1);
|
|
4278
4278
|
}
|
|
4279
|
-
.
|
|
4279
|
+
.List_separator__Zjk5Y {
|
|
4280
4280
|
border-bottom: var(--border);
|
|
4281
4281
|
}
|
|
4282
|
-
.
|
|
4282
|
+
.List_section__MDgwZ:not(:last-child) {
|
|
4283
4283
|
margin-bottom: var(--spacing-4);
|
|
4284
4284
|
}
|
|
4285
|
-
.
|
|
4285
|
+
.List_header__MjUxO {
|
|
4286
4286
|
font-size: var(--font-size-2);
|
|
4287
4287
|
font-weight: var(--font-weight-bold);
|
|
4288
4288
|
padding: var(--padding);
|
|
4289
4289
|
}
|
|
4290
|
-
.
|
|
4290
|
+
.List_item__NTg2Z {
|
|
4291
4291
|
display: flex;
|
|
4292
4292
|
align-items: center;
|
|
4293
4293
|
justify-content: space-between;
|
|
@@ -4300,28 +4300,27 @@ body a.Button_button__NDYwM {
|
|
|
4300
4300
|
outline: none;
|
|
4301
4301
|
border-radius: var(--border-radius);
|
|
4302
4302
|
}
|
|
4303
|
-
.
|
|
4303
|
+
.List_item__NTg2Z[data-disabled] {
|
|
4304
4304
|
color: var(--font-color-disabled);
|
|
4305
4305
|
}
|
|
4306
|
-
.
|
|
4307
|
-
.
|
|
4306
|
+
.List_item__NTg2Z[data-focus],
|
|
4307
|
+
.List_item__NTg2Z[data-focus-visible] {
|
|
4308
4308
|
background: var(--highlight-color);
|
|
4309
4309
|
}
|
|
4310
|
-
.
|
|
4310
|
+
.List_item__NTg2Z:hover {
|
|
4311
4311
|
background: var(--highlight-color);
|
|
4312
4312
|
}
|
|
4313
|
-
.
|
|
4313
|
+
.List_item__NTg2Z[data-selected] {
|
|
4314
4314
|
font-weight: bold;
|
|
4315
|
-
& .
|
|
4315
|
+
& .List_checkmark__M2M5Y {
|
|
4316
4316
|
display: flex;
|
|
4317
4317
|
justify-content: flex-end;
|
|
4318
|
-
flex: 1;
|
|
4319
4318
|
}
|
|
4320
4319
|
}
|
|
4321
|
-
.
|
|
4320
|
+
.List_checkmark__M2M5Y {
|
|
4322
4321
|
display: none;
|
|
4323
4322
|
}
|
|
4324
|
-
.
|
|
4323
|
+
.List_hideCheckmark__YmNlM .List_checkmark__M2M5Y {
|
|
4325
4324
|
display: none;
|
|
4326
4325
|
}
|
|
4327
4326
|
|
|
@@ -4696,26 +4695,29 @@ body a.Button_button__NDYwM {
|
|
|
4696
4695
|
}
|
|
4697
4696
|
|
|
4698
4697
|
/* virtual-css:css:e3e6aca5943038cfd68ddbab1d1ccf5e */
|
|
4699
|
-
.
|
|
4698
|
+
.RadioGroup_radiogroup__ZDJlY {
|
|
4699
|
+
font-size: var(--font-size);
|
|
4700
|
+
color: var(--font-color);
|
|
4701
|
+
}
|
|
4702
|
+
.RadioGroup_inputs__OTc1Y {
|
|
4700
4703
|
display: flex;
|
|
4701
4704
|
flex-direction: column;
|
|
4702
4705
|
gap: var(--spacing-4);
|
|
4703
|
-
font-size: var(--font-size);
|
|
4704
|
-
color: var(--font-color);
|
|
4705
4706
|
}
|
|
4706
|
-
.
|
|
4707
|
+
.RadioGroup_radiogroup__ZDJlY[data-orientation=vertical] .RadioGroup_inputs__OTc1Y {
|
|
4707
4708
|
flex-direction: column;
|
|
4708
4709
|
}
|
|
4709
|
-
.
|
|
4710
|
+
.RadioGroup_radiogroup__ZDJlY[data-orientation=horizontal] .RadioGroup_inputs__OTc1Y {
|
|
4710
4711
|
flex-direction: row;
|
|
4712
|
+
gap: var(--spacing-6);
|
|
4711
4713
|
}
|
|
4712
|
-
.
|
|
4714
|
+
.RadioGroup_radio__ZDJiM {
|
|
4713
4715
|
display: flex;
|
|
4714
4716
|
align-items: center;
|
|
4715
|
-
gap: var(--
|
|
4717
|
+
gap: var(--gap);
|
|
4716
4718
|
forced-color-adjust: none;
|
|
4717
4719
|
}
|
|
4718
|
-
.
|
|
4720
|
+
.RadioGroup_radio__ZDJiM:before {
|
|
4719
4721
|
content: "";
|
|
4720
4722
|
display: block;
|
|
4721
4723
|
width: 20px;
|
|
@@ -4727,20 +4729,20 @@ body a.Button_button__NDYwM {
|
|
|
4727
4729
|
transition: all 200ms;
|
|
4728
4730
|
box-shadow: var(--box-shadow);
|
|
4729
4731
|
}
|
|
4730
|
-
.
|
|
4732
|
+
.RadioGroup_radio__ZDJiM[data-pressed]:before {
|
|
4731
4733
|
border-color: var(--border-color);
|
|
4732
4734
|
}
|
|
4733
|
-
.
|
|
4735
|
+
.RadioGroup_radio__ZDJiM[data-selected]:before {
|
|
4734
4736
|
border-color: var(--primary-color);
|
|
4735
4737
|
border-width: 7px;
|
|
4736
4738
|
}
|
|
4737
|
-
.
|
|
4739
|
+
.RadioGroup_radio__ZDJiM[data-selected][data-pressed]:before {
|
|
4738
4740
|
border-color: var(--primary-color);
|
|
4739
4741
|
}
|
|
4740
|
-
.
|
|
4742
|
+
.RadioGroup_radio__ZDJiM[data-disabled] {
|
|
4741
4743
|
color: var(--font-color-muted);
|
|
4742
4744
|
}
|
|
4743
|
-
.
|
|
4745
|
+
.RadioGroup_radio__ZDJiM[data-disabled]:before {
|
|
4744
4746
|
background-color: var(--base-color-4);
|
|
4745
4747
|
}
|
|
4746
4748
|
|