@blockle/blocks 0.11.0 → 0.11.1
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.cjs +10 -42
- package/dist/index.mjs +4 -36
- package/dist/momotaro.chunk.d.ts +266 -266
- package/dist/reset.css.cjs +0 -2
- package/dist/reset.css.mjs +0 -2
- package/dist/styles/components/display/Divider/divider.css.cjs +10 -3
- package/dist/styles/components/display/Divider/divider.css.mjs +10 -3
- package/dist/styles/components/form/Button/Button.css.cjs +10 -3
- package/dist/styles/components/form/Button/Button.css.mjs +10 -3
- package/dist/styles/components/form/Checkbox/checkbox.css.cjs +24 -5
- package/dist/styles/components/form/Checkbox/checkbox.css.mjs +24 -5
- package/dist/styles/components/form/Input/input.css.cjs +14 -3
- package/dist/styles/components/form/Input/input.css.mjs +14 -3
- package/dist/styles/components/form/Radio/radio.css.cjs +24 -5
- package/dist/styles/components/form/Radio/radio.css.mjs +24 -5
- package/dist/styles/components/form/Select/select.css.cjs +30 -5
- package/dist/styles/components/form/Select/select.css.mjs +30 -5
- package/dist/styles/components/form/Slider/slider.css.cjs +64 -7
- package/dist/styles/components/form/Slider/slider.css.mjs +64 -7
- package/dist/styles/components/form/Switch/switch.css.cjs +20 -4
- package/dist/styles/components/form/Switch/switch.css.mjs +20 -4
- package/dist/styles/components/overlay/Dialog/dialog.css.cjs +18 -3
- package/dist/styles/components/overlay/Dialog/dialog.css.mjs +18 -3
- package/dist/styles/components/typography/Heading/heading.css.cjs +10 -3
- package/dist/styles/components/typography/Heading/heading.css.mjs +10 -3
- package/dist/styles/components/typography/Text/text.css.cjs +10 -3
- package/dist/styles/components/typography/Text/text.css.mjs +10 -3
- package/dist/styles/lib/css/atoms/atomicProperties.cjs +83 -0
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +84 -0
- package/dist/styles/lib/css/atoms/breakpoints.cjs +11 -0
- package/dist/styles/lib/css/atoms/breakpoints.mjs +12 -0
- package/dist/styles/lib/css/atoms/sprinkles.css.cjs +31 -2088
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +31 -2088
- package/dist/styles/lib/css/layers/layers.css.cjs +7 -0
- package/dist/styles/lib/css/layers/layers.css.mjs +8 -0
- package/dist/styles/lib/css/style/style.cjs +28 -0
- package/dist/styles/lib/css/style/style.mjs +29 -0
- package/dist/styles/lib/theme/makeComponentTheme.cjs +5 -0
- package/dist/styles/lib/theme/makeComponentTheme.mjs +6 -0
- package/dist/styles/lib/theme/makeTheme.cjs +2 -18
- package/dist/styles/lib/theme/makeTheme.mjs +1 -17
- package/dist/styles/lib/theme/makeVanillaTheme.cjs +19 -0
- package/dist/styles/lib/theme/makeVanillaTheme.mjs +20 -0
- package/dist/styles/lib/theme/tokens.cjs +81 -0
- package/dist/styles/lib/theme/tokens.mjs +82 -0
- package/dist/styles/lib/theme/vars.css.cjs +4 -76
- package/dist/styles/lib/theme/vars.css.mjs +4 -76
- package/dist/styles/themes/momotaro/components/button.css.cjs +103 -0
- package/dist/styles/themes/momotaro/components/button.css.mjs +104 -0
- package/dist/styles/themes/momotaro/components/checkbox.css.cjs +59 -0
- package/dist/styles/themes/momotaro/components/checkbox.css.mjs +60 -0
- package/dist/styles/themes/momotaro/components/dialog.css.cjs +68 -0
- package/dist/styles/themes/momotaro/components/dialog.css.mjs +69 -0
- package/dist/styles/themes/momotaro/components/divider.css.cjs +11 -0
- package/dist/styles/themes/momotaro/components/divider.css.mjs +12 -0
- package/dist/styles/themes/momotaro/components/dropdown.css.cjs +53 -0
- package/dist/styles/themes/momotaro/components/dropdown.css.mjs +54 -0
- package/dist/styles/themes/momotaro/components/helpers.css.cjs +43 -0
- package/dist/styles/themes/momotaro/components/helpers.css.mjs +44 -0
- package/dist/styles/themes/momotaro/components/index.cjs +32 -0
- package/dist/styles/themes/momotaro/components/index.mjs +33 -0
- package/dist/styles/themes/momotaro/components/input.css.cjs +41 -0
- package/dist/styles/themes/momotaro/components/input.css.mjs +42 -0
- package/dist/styles/themes/momotaro/components/label.css.cjs +33 -0
- package/dist/styles/themes/momotaro/components/label.css.mjs +34 -0
- package/dist/styles/themes/momotaro/components/link.css.cjs +47 -0
- package/dist/styles/themes/momotaro/components/link.css.mjs +48 -0
- package/dist/styles/themes/momotaro/components/progress.css.cjs +55 -0
- package/dist/styles/themes/momotaro/components/progress.css.mjs +56 -0
- package/dist/styles/themes/momotaro/components/radio.css.cjs +60 -0
- package/dist/styles/themes/momotaro/components/radio.css.mjs +61 -0
- package/dist/styles/themes/momotaro/components/select.css.cjs +44 -0
- package/dist/styles/themes/momotaro/components/select.css.mjs +45 -0
- package/dist/styles/themes/momotaro/components/slider.css.cjs +65 -0
- package/dist/styles/themes/momotaro/components/slider.css.mjs +66 -0
- package/dist/styles/themes/momotaro/components/spinner.css.cjs +43 -0
- package/dist/styles/themes/momotaro/components/spinner.css.mjs +44 -0
- package/dist/styles/themes/momotaro/components/switch.css.cjs +58 -0
- package/dist/styles/themes/momotaro/components/switch.css.mjs +59 -0
- package/dist/styles/themes/momotaro/components/transitions.cjs +3 -0
- package/dist/styles/themes/momotaro/components/transitions.mjs +4 -0
- package/dist/styles/themes/momotaro/momotaro.css.cjs +7 -191
- package/dist/styles/themes/momotaro/momotaro.css.mjs +7 -191
- package/dist/styles/themes/momotaro/tokens.css.cjs +84 -0
- package/dist/styles/themes/momotaro/tokens.css.mjs +85 -0
- package/package.json +1 -1
- package/dist/style.css +0 -2851
- package/dist/styles/components/form/Button/Button.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Button/Button.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Checkbox/checkbox.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Input/input.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Input/input.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Radio/radio.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Radio/radio.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Select/select.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Select/select.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Slider/slider.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Slider/slider.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/form/Switch/switch.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/form/Switch/switch.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/overlay/Dialog/dialog.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/typography/Heading/heading.css.ts.vanilla.mjs +0 -1
- package/dist/styles/components/typography/Text/text.css.ts.vanilla.cjs +0 -1
- package/dist/styles/components/typography/Text/text.css.ts.vanilla.mjs +0 -1
- package/dist/styles/entries/reset.css.ts.vanilla.cjs +0 -1
- package/dist/styles/entries/reset.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/css/atoms/sprinkles.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/css/layers/layers.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/css/layers/layers.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/css/reset/reset.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/css/reset/reset.css.ts.vanilla.mjs +0 -1
- package/dist/styles/lib/theme/vars.css.ts.vanilla.cjs +0 -1
- package/dist/styles/lib/theme/vars.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/button.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/checkbox.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/dialog.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/divider.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/dropdown.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/helpers.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/input.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/label.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/link.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/progress.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/radio.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/select.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/slider.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/spinner.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/components/switch.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/momotaro.css.ts.vanilla.mjs +0 -1
- package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.cjs +0 -1
- package/dist/styles/themes/momotaro/tokens.css.ts.vanilla.mjs +0 -1
- /package/dist/styles/{components/display/Divider/divider.css.ts.vanilla.cjs → lib/css/reset/reset.css.cjs} +0 -0
- /package/dist/styles/{components/display/Divider/divider.css.ts.vanilla.mjs → lib/css/reset/reset.css.mjs} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const styles_lib_css_atoms_breakpoints_cjs = require("./styles/lib/css/atoms/breakpoints.cjs");
|
|
4
|
+
const styles_lib_css_style_style_cjs = require("./styles/lib/css/style/style.cjs");
|
|
5
|
+
const styles_lib_theme_makeComponentTheme_cjs = require("./styles/lib/theme/makeComponentTheme.cjs");
|
|
5
6
|
const styles_lib_theme_makeTheme_cjs = require("./styles/lib/theme/makeTheme.cjs");
|
|
6
7
|
const styles_lib_theme_vars_css_cjs = require("./styles/lib/theme/vars.css.cjs");
|
|
7
8
|
const styles_components_display_Divider_Divider_cjs = require("./styles/components/display/Divider/Divider.cjs");
|
|
9
|
+
const styles_lib_css_atoms_sprinkles_css_cjs = require("./styles/lib/css/atoms/sprinkles.css.cjs");
|
|
8
10
|
const jsxRuntime = require("react/jsx-runtime");
|
|
9
11
|
const react = require("react");
|
|
10
12
|
const styles_components_form_Button_Button_cjs = require("./styles/components/form/Button/Button.cjs");
|
|
@@ -18,40 +20,6 @@ const styles_components_other_BlocksProvider_BlocksProvider_cjs = require("./sty
|
|
|
18
20
|
const styles_components_overlay_Dialog_Dialog_cjs = require("./styles/components/overlay/Dialog/Dialog.cjs");
|
|
19
21
|
const styles_components_typography_Heading_Heading_cjs = require("./styles/components/typography/Heading/Heading.cjs");
|
|
20
22
|
const styles_components_typography_Text_Text_cjs = require("./styles/components/typography/Text/Text.cjs");
|
|
21
|
-
const breakpoints = {
|
|
22
|
-
mobile: 0,
|
|
23
|
-
tablet: 740,
|
|
24
|
-
desktop: 992,
|
|
25
|
-
wide: 1200
|
|
26
|
-
};
|
|
27
|
-
const breakpointQuery = (key) => `screen and (min-width: ${breakpoints[key]}px)`;
|
|
28
|
-
function style(props) {
|
|
29
|
-
const styleRule = {};
|
|
30
|
-
const atomClassNames = [];
|
|
31
|
-
if (Array.isArray(props)) {
|
|
32
|
-
return props.map((rule) => {
|
|
33
|
-
if (typeof rule === "string") {
|
|
34
|
-
return rule;
|
|
35
|
-
}
|
|
36
|
-
return style(rule);
|
|
37
|
-
}).join(" ");
|
|
38
|
-
}
|
|
39
|
-
for (const [name, value] of Object.entries(props)) {
|
|
40
|
-
if (styles_lib_css_atoms_sprinkles_css_cjs.atoms.properties.has(name)) {
|
|
41
|
-
try {
|
|
42
|
-
atomClassNames.push(styles_lib_css_atoms_sprinkles_css_cjs.atoms({ [name]: value }));
|
|
43
|
-
} catch {
|
|
44
|
-
styleRule[name] = value;
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
styleRule[name] = value;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return css.style([styleRule, ...atomClassNames]);
|
|
51
|
-
}
|
|
52
|
-
function makeComponentTheme(component, componentTheme) {
|
|
53
|
-
return componentTheme;
|
|
54
|
-
}
|
|
55
23
|
const Progress = react.forwardRef(function Progress2({ value, max = 100, className, ...restProps }, ref) {
|
|
56
24
|
const containerClassName = styles_components_display_Divider_Divider_cjs.useComponentStyles(
|
|
57
25
|
"progress",
|
|
@@ -236,7 +204,7 @@ const Dropdown = ({
|
|
|
236
204
|
onRequestClose,
|
|
237
205
|
open,
|
|
238
206
|
repositionOnScroll,
|
|
239
|
-
style
|
|
207
|
+
style,
|
|
240
208
|
variant,
|
|
241
209
|
...restProps
|
|
242
210
|
}) => {
|
|
@@ -316,7 +284,7 @@ const Dropdown = ({
|
|
|
316
284
|
className: styles_components_display_Divider_Divider_cjs.classnames(containerClassName, className),
|
|
317
285
|
position: "absolute",
|
|
318
286
|
style: {
|
|
319
|
-
...
|
|
287
|
+
...style,
|
|
320
288
|
// TODO Think about how to handle this, perhaps we could add a custom class to the dropdown
|
|
321
289
|
// Or we remove it from getDropdownPosition?
|
|
322
290
|
// "horizontal" ? "vertical"
|
|
@@ -383,7 +351,9 @@ const Tooltip = ({ align = "top", children, label }) => {
|
|
|
383
351
|
)
|
|
384
352
|
] });
|
|
385
353
|
};
|
|
386
|
-
exports.
|
|
354
|
+
exports.breakpointQuery = styles_lib_css_atoms_breakpoints_cjs.breakpointQuery;
|
|
355
|
+
exports.style = styles_lib_css_style_style_cjs.style;
|
|
356
|
+
exports.makeComponentTheme = styles_lib_theme_makeComponentTheme_cjs.makeComponentTheme;
|
|
387
357
|
exports.makeTheme = styles_lib_theme_makeTheme_cjs.makeTheme;
|
|
388
358
|
exports.vars = styles_lib_theme_vars_css_cjs.vars;
|
|
389
359
|
exports.Box = styles_components_display_Divider_Divider_cjs.Box;
|
|
@@ -393,6 +363,7 @@ exports.classnames = styles_components_display_Divider_Divider_cjs.classnames;
|
|
|
393
363
|
exports.createSlottable = styles_components_display_Divider_Divider_cjs.createSlottable;
|
|
394
364
|
exports.useComponentStyleDefaultProps = styles_components_display_Divider_Divider_cjs.useComponentStyleDefaultProps;
|
|
395
365
|
exports.useComponentStyles = styles_components_display_Divider_Divider_cjs.useComponentStyles;
|
|
366
|
+
exports.atoms = styles_lib_css_atoms_sprinkles_css_cjs.atoms;
|
|
396
367
|
exports.Button = styles_components_form_Button_Button_cjs.Button;
|
|
397
368
|
exports.Spinner = styles_components_form_Button_Button_cjs.Spinner;
|
|
398
369
|
exports.Checkbox = styles_components_form_Checkbox_Checkbox_cjs.Checkbox;
|
|
@@ -416,6 +387,3 @@ exports.Link = Link;
|
|
|
416
387
|
exports.Progress = Progress;
|
|
417
388
|
exports.Stack = Stack;
|
|
418
389
|
exports.Tooltip = Tooltip;
|
|
419
|
-
exports.breakpointQuery = breakpointQuery;
|
|
420
|
-
exports.makeComponentTheme = makeComponentTheme;
|
|
421
|
-
exports.style = style;
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { breakpointQuery } from "./styles/lib/css/atoms/breakpoints.mjs";
|
|
4
|
+
import { style } from "./styles/lib/css/style/style.mjs";
|
|
5
|
+
import { makeComponentTheme } from "./styles/lib/theme/makeComponentTheme.mjs";
|
|
5
6
|
import { makeTheme } from "./styles/lib/theme/makeTheme.mjs";
|
|
6
7
|
import { vars } from "./styles/lib/theme/vars.css.mjs";
|
|
7
8
|
import { useComponentStyles, Box, classnames, createSlottable, composeRefs } from "./styles/components/display/Divider/Divider.mjs";
|
|
8
9
|
import { Divider, Slot, useComponentStyleDefaultProps } from "./styles/components/display/Divider/Divider.mjs";
|
|
10
|
+
import { atoms } from "./styles/lib/css/atoms/sprinkles.css.mjs";
|
|
9
11
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
10
12
|
import { forwardRef, useEffect, useState, useRef, useLayoutEffect, useCallback, useId, Children, isValidElement, cloneElement } from "react";
|
|
11
13
|
import { Button, Spinner } from "./styles/components/form/Button/Button.mjs";
|
|
@@ -20,40 +22,6 @@ import { useLayer, useVisibilityState, useIsomorphicLayoutEffect, hasAnimationDu
|
|
|
20
22
|
import { Dialog, usePreventBodyScroll, useRootAriaHidden } from "./styles/components/overlay/Dialog/Dialog.mjs";
|
|
21
23
|
import { Heading } from "./styles/components/typography/Heading/Heading.mjs";
|
|
22
24
|
import { Text } from "./styles/components/typography/Text/Text.mjs";
|
|
23
|
-
const breakpoints = {
|
|
24
|
-
mobile: 0,
|
|
25
|
-
tablet: 740,
|
|
26
|
-
desktop: 992,
|
|
27
|
-
wide: 1200
|
|
28
|
-
};
|
|
29
|
-
const breakpointQuery = (key) => `screen and (min-width: ${breakpoints[key]}px)`;
|
|
30
|
-
function style(props) {
|
|
31
|
-
const styleRule = {};
|
|
32
|
-
const atomClassNames = [];
|
|
33
|
-
if (Array.isArray(props)) {
|
|
34
|
-
return props.map((rule) => {
|
|
35
|
-
if (typeof rule === "string") {
|
|
36
|
-
return rule;
|
|
37
|
-
}
|
|
38
|
-
return style(rule);
|
|
39
|
-
}).join(" ");
|
|
40
|
-
}
|
|
41
|
-
for (const [name, value] of Object.entries(props)) {
|
|
42
|
-
if (atoms.properties.has(name)) {
|
|
43
|
-
try {
|
|
44
|
-
atomClassNames.push(atoms({ [name]: value }));
|
|
45
|
-
} catch {
|
|
46
|
-
styleRule[name] = value;
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
styleRule[name] = value;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return style$1([styleRule, ...atomClassNames]);
|
|
53
|
-
}
|
|
54
|
-
function makeComponentTheme(component, componentTheme) {
|
|
55
|
-
return componentTheme;
|
|
56
|
-
}
|
|
57
25
|
const Progress = forwardRef(function Progress2({ value, max = 100, className, ...restProps }, ref) {
|
|
58
26
|
const containerClassName = useComponentStyles(
|
|
59
27
|
"progress",
|