musae 0.2.20 → 0.2.22
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/components/avatar/avatar.js +2 -3
- package/dist/components/avatar/group.js +2 -2
- package/dist/components/badge/badge.js +1 -2
- package/dist/components/bench/bench.d.ts +1 -1
- package/dist/components/bench/bench.js +20 -11
- package/dist/components/bench/types.d.ts +8 -2
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/breadcrumb/item.js +2 -2
- package/dist/components/button/button.js +1 -1
- package/dist/components/calendar/calendar.js +1 -1
- package/dist/components/calendar/hooks.js +2 -3
- package/dist/components/cascader/cascader.js +1 -1
- package/dist/components/checkbox/checkbox.js +8 -9
- package/dist/components/checkbox/styles.d.ts +2 -2
- package/dist/components/checkbox/styles.js +2 -2
- package/dist/components/clock/clock.js +2 -2
- package/dist/components/clock/column.js +1 -2
- package/dist/components/collapse/collapse.js +1 -1
- package/dist/components/collapse/item.js +2 -3
- package/dist/components/date-picker/date-picker.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +1 -1
- package/dist/components/dialog/hooks.js +1 -1
- package/dist/components/dialog/popup.js +4 -4
- package/dist/components/divider/divider.d.ts +1 -1
- package/dist/components/divider/divider.js +42 -10
- package/dist/components/divider/types.d.ts +7 -1
- package/dist/components/drawer/popup.js +2 -2
- package/dist/components/empty/empty.js +1 -1
- package/dist/components/form/field/error.js +1 -1
- package/dist/components/form/field/field.js +1 -2
- package/dist/components/form/field/layout.js +2 -2
- package/dist/components/grid/col.js +1 -1
- package/dist/components/grid/row.js +1 -1
- package/dist/components/highlight/highlight.js +2 -2
- package/dist/components/i18n-button/hooks.js +1 -1
- package/dist/components/i18n-button/i18n-button.js +2 -2
- package/dist/components/icon/icon.js +1 -2
- package/dist/components/image/preview/operations.js +1 -1
- package/dist/components/input/input.js +1 -2
- package/dist/components/layout/header.js +1 -1
- package/dist/components/layout/layout.js +3 -3
- package/dist/components/loading/loading.js +1 -1
- package/dist/components/menu/group.js +3 -4
- package/dist/components/menu/hooks.js +3 -3
- package/dist/components/menu/item.js +2 -3
- package/dist/components/menu/menu.js +1 -2
- package/dist/components/notification/hooks.js +2 -2
- package/dist/components/notification/notification.js +5 -6
- package/dist/components/notification/notifier.js +2 -2
- package/dist/components/pagination/pagination.js +1 -2
- package/dist/components/picker/picker.js +1 -2
- package/dist/components/popconfirm/popconfirm.js +1 -2
- package/dist/components/popover/hooks.js +2 -2
- package/dist/components/popover/popover.js +2 -3
- package/dist/components/popper/dropdown.js +2 -3
- package/dist/components/popper/hooks.js +2 -2
- package/dist/components/progress/linear.js +1 -1
- package/dist/components/quote/index.d.ts +2 -0
- package/dist/components/quote/quote.d.ts +4 -0
- package/dist/components/quote/quote.js +29 -0
- package/dist/components/quote/styles.d.ts +20 -0
- package/dist/components/quote/styles.js +29 -0
- package/dist/components/quote/types.d.ts +12 -0
- package/dist/components/radio/radio.js +2 -3
- package/dist/components/rate/rate.js +1 -1
- package/dist/components/rate/star.js +1 -2
- package/dist/components/rich-text-editor/dropdown.js +2 -2
- package/dist/components/rich-text-editor/plugins/floating-link-editor/index.js +3 -3
- package/dist/components/rich-text-editor/rich-text-editor.js +3 -3
- package/dist/components/select/select.js +1 -1
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/space/space.js +1 -1
- package/dist/components/steps/item.js +1 -2
- package/dist/components/steps/steps.js +1 -1
- package/dist/components/switch/switch.js +1 -2
- package/dist/components/table/body.js +1 -1
- package/dist/components/table/header/cell.js +1 -1
- package/dist/components/table/header/header.js +1 -1
- package/dist/components/tabs/navigation.js +1 -2
- package/dist/components/tabs/panels.js +1 -2
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/tag/tag.js +1 -1
- package/dist/components/theme/tokens.stylex.d.ts +3 -2
- package/dist/components/theme/tokens.stylex.js +10 -1
- package/dist/components/time-picker/panel.js +1 -1
- package/dist/components/time-picker/time-picker.js +2 -3
- package/dist/components/timeline/item.js +3 -3
- package/dist/components/timeline/timeline.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/tour/spotlight.js +1 -2
- package/dist/components/tour/tour.js +4 -4
- package/dist/components/transfer/item.js +1 -1
- package/dist/components/transfer/list.js +1 -1
- package/dist/components/transfer/transfer.js +1 -1
- package/dist/components/tree/list.js +3 -4
- package/dist/components/tree/node.js +1 -2
- package/dist/components/upload/uploadeds.js +1 -1
- package/dist/components/visually-hidden/visually-hidden.js +1 -1
- package/dist/components/waterfall/waterfall.js +1 -2
- package/dist/hooks/use-class-names.d.ts +3 -0
- package/dist/hooks/use-expandable.js +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/{stylex.css → styles.css} +7 -0
- package/dist/utils/class-name.d.ts +9 -0
- package/dist/utils/class-name.js +6 -2
- package/dist/utils/component-token.d.ts +2 -1
- package/dist/utils/component-token.js +1 -0
- package/package.json +25 -25
|
@@ -7,9 +7,8 @@ import { useTheme } from '../theme/hooks.js';
|
|
|
7
7
|
import { ColorToken } from '../../utils/colors.js';
|
|
8
8
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
9
9
|
import { AvatarClassToken } from '../../utils/class-name.js';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
10
|
import { typography } from '../theme/theme.js';
|
|
12
|
-
import { useImageLoader } from '@aiszlab/relax';
|
|
11
|
+
import { useImageLoader, clsx } from '@aiszlab/relax';
|
|
13
12
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
14
13
|
|
|
15
14
|
var _excluded = ["src", "alt", "shape", "size"];
|
|
@@ -164,7 +163,7 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
164
163
|
className: clsx(classNames[AvatarClassToken.Avatar], styled.avatar.className),
|
|
165
164
|
style: styled.avatar.style,
|
|
166
165
|
ref: ref
|
|
167
|
-
}), loadStatus === "loaded" ? (
|
|
166
|
+
}), loadStatus === "loaded" ? (/*#__PURE__*/React.createElement("img", {
|
|
168
167
|
draggable: false,
|
|
169
168
|
src: src,
|
|
170
169
|
alt: alt,
|
|
@@ -5,8 +5,8 @@ import { useClassNames } from '../../hooks/use-class-names.js';
|
|
|
5
5
|
import { AvatarClassToken } from '../../utils/class-name.js';
|
|
6
6
|
import Popover from '../popover/popover.js';
|
|
7
7
|
import Avatar from './avatar.js';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
8
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
9
|
+
import { clsx } from '@aiszlab/relax';
|
|
10
10
|
|
|
11
11
|
var _Group = function Group(_ref) {
|
|
12
12
|
var _children = _ref.children,
|
|
@@ -39,7 +39,7 @@ var _Group = function Group(_ref) {
|
|
|
39
39
|
hidden = _Children$toArray$red2[1];
|
|
40
40
|
// got hidden nodes, show ellipse node
|
|
41
41
|
if (hidden.length > 0) {
|
|
42
|
-
visible.push(
|
|
42
|
+
visible.push(/*#__PURE__*/React.createElement(Popover, {
|
|
43
43
|
content: /*#__PURE__*/React.createElement(_Group, {
|
|
44
44
|
max: Infinity
|
|
45
45
|
}, hidden),
|
|
@@ -3,12 +3,11 @@ import React from 'react';
|
|
|
3
3
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
4
4
|
import { BadgeClassToken } from '../../utils/class-name.js';
|
|
5
5
|
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
6
|
import { typography } from '../theme/theme.js';
|
|
8
7
|
import { sizes } from '../theme/tokens.stylex.js';
|
|
9
8
|
import { useTheme } from '../theme/hooks.js';
|
|
10
9
|
import { ColorToken } from '../../utils/colors.js';
|
|
11
|
-
import { isVoid } from '@aiszlab/relax';
|
|
10
|
+
import { isVoid, clsx } from '@aiszlab/relax';
|
|
12
11
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
13
12
|
|
|
14
13
|
var styles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { BenchProps } from "./types";
|
|
3
|
-
declare const Bench: ({ children, title, logo, navigations, className, style, trailing, onNavigate, location, defaultExpandedKeys, classNames: { main: mainClassName }, }: BenchProps) => React.JSX.Element;
|
|
3
|
+
declare const Bench: ({ children, title, logo, navigations, className, style, trailing, onNavigate, location, defaultExpandedKeys, classNames: { main: mainClassName }, elevation, }: BenchProps) => React.JSX.Element;
|
|
4
4
|
export default Bench;
|
|
@@ -2,13 +2,14 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Layout } from '../layout/index.js';
|
|
4
4
|
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
5
|
+
import { elevations } from '../theme/tokens.stylex.js';
|
|
5
6
|
import Divider from '../divider/divider.js';
|
|
6
7
|
import { useLogo, useNavigations } from './hooks.js';
|
|
7
8
|
import Menu from '../menu/menu.js';
|
|
8
9
|
import { useTheme } from '../theme/hooks.js';
|
|
9
10
|
import { ColorToken } from '../../utils/colors.js';
|
|
10
11
|
import { typography } from '../theme/theme.js';
|
|
11
|
-
import clsx from '
|
|
12
|
+
import { clsx } from '@aiszlab/relax';
|
|
12
13
|
|
|
13
14
|
var Header = Layout.Header,
|
|
14
15
|
Main = Layout.Main,
|
|
@@ -49,12 +50,16 @@ var styles = {
|
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
header: {
|
|
52
|
-
"default": {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
"default": function _default(props) {
|
|
54
|
+
return [{
|
|
55
|
+
gap: "musaex-1lsrmdg",
|
|
56
|
+
rowGap: null,
|
|
57
|
+
columnGap: null,
|
|
58
|
+
boxShadow: "musaex-igitpm",
|
|
59
|
+
$$css: true
|
|
60
|
+
}, {
|
|
61
|
+
"--boxShadow": elevations[props.elevation] != null ? elevations[props.elevation] : "initial"
|
|
62
|
+
}];
|
|
58
63
|
},
|
|
59
64
|
navigation: {
|
|
60
65
|
marginLeft: "musaex-9x39mp",
|
|
@@ -84,7 +89,9 @@ var Bench = function Bench(_ref) {
|
|
|
84
89
|
defaultExpandedKeys = _ref.defaultExpandedKeys,
|
|
85
90
|
_ref$classNames = _ref.classNames,
|
|
86
91
|
_ref$classNames2 = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
87
|
-
mainClassName = _ref$classNames2.main
|
|
92
|
+
mainClassName = _ref$classNames2.main,
|
|
93
|
+
_ref$elevation = _ref.elevation,
|
|
94
|
+
elevation = _ref$elevation === void 0 ? "xsmall" : _ref$elevation;
|
|
88
95
|
var theme = useTheme();
|
|
89
96
|
var _logo = useLogo(logo);
|
|
90
97
|
var _useNavigations = useNavigations({
|
|
@@ -98,7 +105,9 @@ var Bench = function Bench(_ref) {
|
|
|
98
105
|
selectedKeys = _useNavigations.selectedKeys;
|
|
99
106
|
var styled = {
|
|
100
107
|
bench: _stylex.props(styles.bench["default"]),
|
|
101
|
-
header: _stylex.props(styles.header["default"]
|
|
108
|
+
header: _stylex.props(styles.header["default"]({
|
|
109
|
+
elevation: elevation
|
|
110
|
+
})),
|
|
102
111
|
main: _stylex.props(styles.bench.main),
|
|
103
112
|
sider: _stylex.props(styles.bench.sider({
|
|
104
113
|
outlineColor: theme.colors[ColorToken.OutlineVariant]
|
|
@@ -116,7 +125,7 @@ var Bench = function Bench(_ref) {
|
|
|
116
125
|
}, !!_logo && /*#__PURE__*/React.createElement("img", {
|
|
117
126
|
src: _logo === null || _logo === void 0 ? void 0 : _logo.url,
|
|
118
127
|
alt: "logo"
|
|
119
|
-
}), !!_logo && (
|
|
128
|
+
}), !!_logo && (/*#__PURE__*/React.createElement("div", {
|
|
120
129
|
className: styled.divider.className,
|
|
121
130
|
style: styled.divider.style
|
|
122
131
|
}, /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -132,7 +141,7 @@ var Bench = function Bench(_ref) {
|
|
|
132
141
|
style: styled.headerNavigation.style
|
|
133
142
|
}, !!selectedKeys[0] && {
|
|
134
143
|
selectedKeys: [selectedKeys[0]]
|
|
135
|
-
})), trailing), sideMenuItems.length > 0 && (
|
|
144
|
+
})), trailing), sideMenuItems.length > 0 && (/*#__PURE__*/React.createElement(Sider, {
|
|
136
145
|
className: styled.sider.className,
|
|
137
146
|
style: styled.sider.style
|
|
138
147
|
}, /*#__PURE__*/React.createElement(Menu, _objectSpread({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Key, ReactNode } from "react";
|
|
2
|
-
import { ComponentProps } from "../../types/element";
|
|
1
|
+
import type { Key, ReactNode } from "react";
|
|
2
|
+
import type { ComponentProps } from "../../types/element";
|
|
3
|
+
import type { ElevationToken } from "../theme/tokens.stylex";
|
|
3
4
|
export type Logo = {
|
|
4
5
|
/**
|
|
5
6
|
* @description
|
|
@@ -75,4 +76,9 @@ export type BenchProps = ComponentProps & {
|
|
|
75
76
|
* class names
|
|
76
77
|
*/
|
|
77
78
|
classNames?: Partial<Record<"main", string>>;
|
|
79
|
+
/**
|
|
80
|
+
* @description
|
|
81
|
+
* elevation
|
|
82
|
+
*/
|
|
83
|
+
elevation?: ElevationToken;
|
|
78
84
|
};
|
|
@@ -6,7 +6,7 @@ import { useTheme } from '../theme/hooks.js';
|
|
|
6
6
|
import { ColorToken } from '../../utils/colors.js';
|
|
7
7
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
8
8
|
import { BreadcrumbClassToken } from '../../utils/class-name.js';
|
|
9
|
-
import clsx from '
|
|
9
|
+
import { clsx } from '@aiszlab/relax';
|
|
10
10
|
import Item from './item.js';
|
|
11
11
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ import { useTheme } from '../theme/hooks.js';
|
|
|
4
4
|
import { ColorToken } from '../../utils/colors.js';
|
|
5
5
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
6
6
|
import { BreadcrumbClassToken } from '../../utils/class-name.js';
|
|
7
|
-
import clsx from '
|
|
7
|
+
import { clsx } from '@aiszlab/relax';
|
|
8
8
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
9
9
|
|
|
10
10
|
var styles = {
|
|
@@ -76,7 +76,7 @@ var Item = function Item(_ref) {
|
|
|
76
76
|
className: classNames[BreadcrumbClassToken.Item]
|
|
77
77
|
}, isLink && /*#__PURE__*/React.createElement("a", {
|
|
78
78
|
href: href
|
|
79
|
-
}, label), !isLink && label), !max && (
|
|
79
|
+
}, label), !isLink && label), !max && (/*#__PURE__*/React.createElement("li", {
|
|
80
80
|
role: "separator",
|
|
81
81
|
className: clsx(classNames[BreadcrumbClassToken.Separator], styled.separator.className),
|
|
82
82
|
style: styled.separator.style
|
|
@@ -2,7 +2,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import { ButtonClassToken } from '../../utils/class-name.js';
|
|
5
|
-
import clsx from '
|
|
5
|
+
import { clsx } from '@aiszlab/relax';
|
|
6
6
|
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
7
7
|
import { useTheme } from '../theme/hooks.js';
|
|
8
8
|
import { useButton } from './hooks.js';
|
|
@@ -5,7 +5,7 @@ import { useClassNames } from '../../hooks/use-class-names.js';
|
|
|
5
5
|
import { CalendarClassToken } from '../../utils/class-name.js';
|
|
6
6
|
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
7
7
|
import { typography } from '../theme/theme.js';
|
|
8
|
-
import clsx from '
|
|
8
|
+
import { clsx } from '@aiszlab/relax';
|
|
9
9
|
import Button from '../button/button.js';
|
|
10
10
|
import { useTheme } from '../theme/hooks.js';
|
|
11
11
|
import { ColorToken } from '../../utils/colors.js';
|
|
@@ -5,9 +5,8 @@ import dayjs from 'dayjs';
|
|
|
5
5
|
import React, { useMemo, useCallback } from 'react';
|
|
6
6
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
7
7
|
import { CalendarClassToken } from '../../utils/class-name.js';
|
|
8
|
-
import { toArray, useControlledState } from '@aiszlab/relax';
|
|
8
|
+
import { clsx, toArray, useControlledState } from '@aiszlab/relax';
|
|
9
9
|
import { Timespan } from '../../utils/timespan.js';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
10
|
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
12
11
|
import { typography } from '../theme/theme.js';
|
|
13
12
|
import { useTheme } from '../theme/hooks.js';
|
|
@@ -132,7 +131,7 @@ var useDateCells = function useDateCells(_ref) {
|
|
|
132
131
|
className: "musaex-gnae0u musaex-ksl8fa"
|
|
133
132
|
}
|
|
134
133
|
};
|
|
135
|
-
prev.at(prev.length - 1).push(
|
|
134
|
+
prev.at(prev.length - 1).push(/*#__PURE__*/React.createElement("td", {
|
|
136
135
|
title: formatted,
|
|
137
136
|
key: formatted,
|
|
138
137
|
className: clsx(classNames[CalendarClassToken.DateCell], _objectSpread(_defineProperty({}, classNames[CalendarClassToken.DateCellSelected], isSelected), timespan.isRange && _defineProperty(_defineProperty(_defineProperty({}, classNames[CalendarClassToken.DateCellInRange], isBetween), classNames[CalendarClassToken.DateCellRangeFrom], isFrom), classNames[CalendarClassToken.DateCellRangeTo], isTo)), styled.cell.className),
|
|
@@ -8,7 +8,7 @@ import { useOptions, useValue } from './hooks.js';
|
|
|
8
8
|
import Menu from '../menu/menu.js';
|
|
9
9
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
10
10
|
import { CascaderClassToken } from '../../utils/class-name.js';
|
|
11
|
-
import clsx from '
|
|
11
|
+
import { clsx } from '@aiszlab/relax';
|
|
12
12
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
13
13
|
|
|
14
14
|
var _excluded = ["mode", "separator", "options", "complex"];
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import React, { useContext, useMemo } from 'react';
|
|
4
|
-
import { useControlledState, useEvent } from '@aiszlab/relax';
|
|
4
|
+
import { useControlledState, useEvent, clsx } from '@aiszlab/relax';
|
|
5
5
|
import Context from './context.js';
|
|
6
6
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
7
7
|
import { CheckboxClassToken } from '../../utils/class-name.js';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
8
|
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
10
9
|
import { useTheme } from '../theme/hooks.js';
|
|
11
10
|
import { ColorToken } from '../../utils/colors.js';
|
|
12
11
|
import { typography } from '../theme/theme.js';
|
|
13
12
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
14
|
-
import
|
|
13
|
+
import styles from './styles.js';
|
|
15
14
|
|
|
16
15
|
var Checkbox = function Checkbox(_ref) {
|
|
17
16
|
var value = _ref.value,
|
|
@@ -55,16 +54,16 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
55
54
|
onChange === null || onChange === void 0 || onChange(event);
|
|
56
55
|
});
|
|
57
56
|
var styled = {
|
|
58
|
-
checkbox: _stylex.props(
|
|
57
|
+
checkbox: _stylex.props(styles.checkbox["default"], isDisabled && styles.checkbox.disabled, styles.checkbox.variables({
|
|
59
58
|
primaryColor: theme.colors[ColorToken.Primary],
|
|
60
59
|
onPrimaryColor: theme.colors[ColorToken.OnPrimary],
|
|
61
60
|
outlineColor: theme.colors[ColorToken.Outline]
|
|
62
61
|
})),
|
|
63
|
-
trigger: _stylex.props(
|
|
62
|
+
trigger: _stylex.props(styles.trigger["default"], isChecked && styles.trigger.checked, isDisabled && styles.trigger.disabled({
|
|
64
63
|
backgroundColor: theme.colors[ColorToken.OnSurface],
|
|
65
64
|
color: theme.colors[ColorToken.OnPrimary]
|
|
66
|
-
}), !isChecked &&
|
|
67
|
-
label: _stylex.props(
|
|
65
|
+
}), !isChecked && styles.trigger.unchecked),
|
|
66
|
+
label: _stylex.props(styles.label["default"], typography.label.small)
|
|
68
67
|
};
|
|
69
68
|
return /*#__PURE__*/React.createElement("label", {
|
|
70
69
|
className: clsx(styled.checkbox.className, className, classNames[CheckboxClassToken.Checkbox]),
|
|
@@ -77,10 +76,10 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
77
76
|
"aria-checked": isChecked,
|
|
78
77
|
disabled: isDisabled,
|
|
79
78
|
onChange: change
|
|
80
|
-
}), children && (
|
|
79
|
+
}), children && (/*#__PURE__*/React.createElement("span", {
|
|
81
80
|
className: styled.label.className,
|
|
82
81
|
style: styled.label.style
|
|
83
82
|
}, children)));
|
|
84
83
|
};
|
|
85
84
|
|
|
86
|
-
export { Checkbox as default,
|
|
85
|
+
export { Checkbox as default, styles };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const styles: {
|
|
2
2
|
checkbox: Readonly<{
|
|
3
3
|
readonly default: Readonly<{
|
|
4
4
|
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "inline-flex">;
|
|
@@ -90,4 +90,4 @@ declare const _default: {
|
|
|
90
90
|
}>;
|
|
91
91
|
}>;
|
|
92
92
|
};
|
|
93
|
-
export default
|
|
93
|
+
export default styles;
|
|
@@ -5,7 +5,7 @@ import { useClassNames } from '../../hooks/use-class-names.js';
|
|
|
5
5
|
import { ClockClassToken } from '../../utils/class-name.js';
|
|
6
6
|
import { TimeUnit } from './types.js';
|
|
7
7
|
import Column from './column.js';
|
|
8
|
-
import clsx from '
|
|
8
|
+
import { clsx } from '@aiszlab/relax';
|
|
9
9
|
import Divider from '../divider/divider.js';
|
|
10
10
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
11
11
|
|
|
@@ -28,7 +28,7 @@ var Clock = function Clock(_ref) {
|
|
|
28
28
|
onChange: function onChange(_value) {
|
|
29
29
|
_onChange === null || _onChange === void 0 || _onChange(Object.values(_objectSpread(_objectSpread(_objectSpread({}, [0, 0, 0]), value), {}, _defineProperty({}, index, _value))));
|
|
30
30
|
}
|
|
31
|
-
}), index === columns.length - 1 ? null : (
|
|
31
|
+
}), index === columns.length - 1 ? null : (/*#__PURE__*/React.createElement(Divider, {
|
|
32
32
|
orientation: "vertical",
|
|
33
33
|
key: "".concat(unit, "-divider")
|
|
34
34
|
}))];
|
|
@@ -3,11 +3,10 @@ import { useTimeUnit } from './hooks.js';
|
|
|
3
3
|
import Menu from '../menu/menu.js';
|
|
4
4
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
5
5
|
import { ClockClassToken } from '../../utils/class-name.js';
|
|
6
|
-
import { isVoid } from '@aiszlab/relax';
|
|
6
|
+
import { isVoid, clsx } from '@aiszlab/relax';
|
|
7
7
|
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
8
8
|
import { useTheme } from '../theme/hooks.js';
|
|
9
9
|
import { ColorToken } from '../../utils/colors.js';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
10
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
12
11
|
|
|
13
12
|
var styles = {
|
|
@@ -5,7 +5,7 @@ import { useClassNames } from '../../hooks/use-class-names.js';
|
|
|
5
5
|
import { CollapseClassToken } from '../../utils/class-name.js';
|
|
6
6
|
import CollapseItem from './item.js';
|
|
7
7
|
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
8
|
-
import clsx from '
|
|
8
|
+
import { clsx } from '@aiszlab/relax';
|
|
9
9
|
import { useActiveKeys } from './hooks.js';
|
|
10
10
|
import { Context } from './context.js';
|
|
11
11
|
import { useTheme } from '../theme/hooks.js';
|
|
@@ -6,9 +6,8 @@ import React, { useContext } from 'react';
|
|
|
6
6
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
7
7
|
import { CollapseClassToken } from '../../utils/class-name.js';
|
|
8
8
|
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
9
|
-
import { useUpdateEffect, useEvent } from '@aiszlab/relax';
|
|
9
|
+
import { useUpdateEffect, useEvent, clsx } from '@aiszlab/relax';
|
|
10
10
|
import { useAnimate } from 'framer-motion';
|
|
11
|
-
import clsx from 'clsx';
|
|
12
11
|
import { Context } from './context.js';
|
|
13
12
|
import { useExpandable } from '../../hooks/use-expandable.js';
|
|
14
13
|
import { useTheme } from '../theme/hooks.js';
|
|
@@ -111,7 +110,7 @@ var CollapseItem = function CollapseItem(_ref) {
|
|
|
111
110
|
var _useExpandable = useExpandable(),
|
|
112
111
|
expand = _useExpandable.expand,
|
|
113
112
|
collapse = _useExpandable.collapse;
|
|
114
|
-
useUpdateEffect(
|
|
113
|
+
useUpdateEffect(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
115
114
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
116
115
|
while (1) switch (_context.prev = _context.next) {
|
|
117
116
|
case 0:
|
|
@@ -5,7 +5,7 @@ import { useValue } from './hooks.js';
|
|
|
5
5
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
6
6
|
import { DatePickerClassToken } from '../../utils/class-name.js';
|
|
7
7
|
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
8
|
-
import clsx from '
|
|
8
|
+
import { clsx } from '@aiszlab/relax';
|
|
9
9
|
import { styles } from '../input/input.js';
|
|
10
10
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ import { useValue } from './hooks.js';
|
|
|
5
5
|
import Calendar from '../calendar/calendar.js';
|
|
6
6
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
7
7
|
import { DateRangePickerClassToken } from '../../utils/class-name.js';
|
|
8
|
-
import clsx from '
|
|
8
|
+
import { clsx } from '@aiszlab/relax';
|
|
9
9
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
10
10
|
import SwapHoriz from '../icon/icons/action/swap-horiz.js';
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ var useFooter = function useFooter(_ref) {
|
|
|
18
18
|
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
19
19
|
locale = _useLocale2[0];
|
|
20
20
|
return useMemo(function () {
|
|
21
|
-
return footer !== null && footer !== void 0 ? footer : (
|
|
21
|
+
return footer !== null && footer !== void 0 ? footer : (/*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
22
22
|
onClick: onClose,
|
|
23
23
|
color: "secondary",
|
|
24
24
|
variant: "text"
|
|
@@ -12,7 +12,7 @@ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modu
|
|
|
12
12
|
import { useTheme } from '../theme/hooks.js';
|
|
13
13
|
import { ColorToken } from '../../utils/colors.js';
|
|
14
14
|
import { typography } from '../theme/theme.js';
|
|
15
|
-
import clsx from '
|
|
15
|
+
import { clsx } from '@aiszlab/relax';
|
|
16
16
|
import { contains } from '@aiszlab/relax/dom';
|
|
17
17
|
import { useClosable } from '../../hooks/use-closable.js';
|
|
18
18
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
@@ -126,7 +126,7 @@ var Popup = function Popup(_ref) {
|
|
|
126
126
|
onKeyDown = _useClosable.onKeyDown,
|
|
127
127
|
onOverlayClick = _useClosable.onOverlayClick;
|
|
128
128
|
useEffect(function () {
|
|
129
|
-
_asyncToGenerator(
|
|
129
|
+
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
130
130
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
131
131
|
while (1) switch (_context.prev = _context.next) {
|
|
132
132
|
case 0:
|
|
@@ -199,13 +199,13 @@ var Popup = function Popup(_ref) {
|
|
|
199
199
|
className: clsx(classNames[DialogClassToken.Panel], styled.panel.className),
|
|
200
200
|
style: _objectSpread(_objectSpread({}, styled.panel.style), (_props$styles = props$1.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.panel),
|
|
201
201
|
ref: panelRef
|
|
202
|
-
}, closer, !!props$1.title && (
|
|
202
|
+
}, closer, !!props$1.title && (/*#__PURE__*/React.createElement("div", {
|
|
203
203
|
className: clsx(classNames[DialogClassToken.Header], styled.header.className),
|
|
204
204
|
style: styled.header.style
|
|
205
205
|
}, props$1.title)), /*#__PURE__*/React.createElement("div", {
|
|
206
206
|
className: clsx(classNames[DialogClassToken.Body], styled.body.className),
|
|
207
207
|
style: _objectSpread(_objectSpread({}, styled.body.style), (_props$styles2 = props$1.styles) === null || _props$styles2 === void 0 ? void 0 : _props$styles2.body)
|
|
208
|
-
}, props$1.children), !!footer && (
|
|
208
|
+
}, props$1.children), !!footer && (/*#__PURE__*/React.createElement("div", {
|
|
209
209
|
className: clsx(classNames[DialogClassToken.Footer], styled.footer.className),
|
|
210
210
|
style: styled.footer.style
|
|
211
211
|
}, footer))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type DividerProps } from "./types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare const Divider: ({ align, children, orientation, className, style, }: DividerProps) => React.JSX.Element;
|
|
3
|
+
declare const Divider: ({ align, children, orientation, className, style, margin, }: DividerProps) => React.JSX.Element;
|
|
4
4
|
export default Divider;
|
|
@@ -7,18 +7,43 @@ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modu
|
|
|
7
7
|
import { useTheme } from '../theme/hooks.js';
|
|
8
8
|
import { ColorToken } from '../../utils/colors.js';
|
|
9
9
|
import { typography } from '../theme/theme.js';
|
|
10
|
-
import clsx from '
|
|
10
|
+
import { clsx } from '@aiszlab/relax';
|
|
11
11
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
12
|
+
import { useGutters } from '../../hooks/use-gutters.js';
|
|
12
13
|
|
|
13
14
|
var styles = {
|
|
14
15
|
divider: {
|
|
15
|
-
horizontal: {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
horizontal: function horizontal(props) {
|
|
17
|
+
return [{
|
|
18
|
+
width: "musaex-1k094eu",
|
|
19
|
+
marginTop: "musaex-fdd01f",
|
|
20
|
+
marginBottom: "musaex-19qvvsl",
|
|
21
|
+
$$css: true
|
|
22
|
+
}, {
|
|
23
|
+
"--marginBlockStart": function (val) {
|
|
24
|
+
return typeof val === "number" ? val + "px" : val != null ? val : "initial";
|
|
25
|
+
}(props.margins[0]),
|
|
26
|
+
"--marginBlockEnd": function (val) {
|
|
27
|
+
return typeof val === "number" ? val + "px" : val != null ? val : "initial";
|
|
28
|
+
}(props.margins[1])
|
|
29
|
+
}];
|
|
18
30
|
},
|
|
19
|
-
vertical: {
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
vertical: function vertical(props) {
|
|
32
|
+
return [{
|
|
33
|
+
height: "musaex-1xj1dsn",
|
|
34
|
+
marginInlineStart: "musaex-1f2nheo",
|
|
35
|
+
marginLeft: null,
|
|
36
|
+
marginRight: null,
|
|
37
|
+
marginInlineEnd: "musaex-1uoloo9",
|
|
38
|
+
$$css: true
|
|
39
|
+
}, {
|
|
40
|
+
"--marginInlineStart": function (val) {
|
|
41
|
+
return typeof val === "number" ? val + "px" : val != null ? val : "initial";
|
|
42
|
+
}(props.margins[0]),
|
|
43
|
+
"--marginInlineEnd": function (val) {
|
|
44
|
+
return typeof val === "number" ? val + "px" : val != null ? val : "initial";
|
|
45
|
+
}(props.margins[1])
|
|
46
|
+
}];
|
|
22
47
|
}
|
|
23
48
|
},
|
|
24
49
|
simple: {
|
|
@@ -119,15 +144,22 @@ var Divider = function Divider(_ref) {
|
|
|
119
144
|
_ref$orientation = _ref.orientation,
|
|
120
145
|
orientation = _ref$orientation === void 0 ? "horizontal" : _ref$orientation,
|
|
121
146
|
className = _ref.className,
|
|
122
|
-
style = _ref.style
|
|
147
|
+
style = _ref.style,
|
|
148
|
+
_ref$margin = _ref.margin,
|
|
149
|
+
margin = _ref$margin === void 0 ? 0 : _ref$margin;
|
|
123
150
|
var classNames = useClassNames(ComponentToken.Divider);
|
|
124
151
|
var offset = useOffset({
|
|
125
152
|
align: align
|
|
126
153
|
});
|
|
127
154
|
var theme = useTheme();
|
|
128
155
|
var isLabeled = !!children;
|
|
156
|
+
var margins = useGutters({
|
|
157
|
+
gutter: margin
|
|
158
|
+
});
|
|
129
159
|
var styled = {
|
|
130
|
-
divider: props(styles.divider[orientation]
|
|
160
|
+
divider: props(styles.divider[orientation]({
|
|
161
|
+
margins: margins
|
|
162
|
+
}), !isLabeled && styles.simple[orientation]({
|
|
131
163
|
backgroundColor: theme.colors[ColorToken.OutlineVariant]
|
|
132
164
|
}), isLabeled && styles.labeled[orientation]({
|
|
133
165
|
backgroundColor: theme.colors[ColorToken.OutlineVariant],
|
|
@@ -138,7 +170,7 @@ var Divider = function Divider(_ref) {
|
|
|
138
170
|
return /*#__PURE__*/React.createElement("div", {
|
|
139
171
|
className: clsx(classNames[DividerClassToken.Divider], className, styled.divider.className),
|
|
140
172
|
style: _objectSpread(_objectSpread({}, styled.divider.style), style)
|
|
141
|
-
}, !!children && (
|
|
173
|
+
}, !!children && (/*#__PURE__*/React.createElement("span", {
|
|
142
174
|
className: clsx(classNames[DividerClassToken.Label], styled.label.className),
|
|
143
175
|
style: styled.label.style
|
|
144
176
|
}, children)));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import { ComponentProps } from "../../types/element";
|
|
2
|
+
import type { ComponentProps } from "../../types/element";
|
|
3
|
+
import type { Gutter } from "../../hooks/use-gutters";
|
|
3
4
|
export type Align = "center" | "left" | "right";
|
|
4
5
|
export type Orientation = "horizontal" | "vertical";
|
|
5
6
|
/**
|
|
@@ -25,4 +26,9 @@ export interface DividerProps extends ComponentProps {
|
|
|
25
26
|
* @default "horizontal"
|
|
26
27
|
*/
|
|
27
28
|
orientation?: Orientation;
|
|
29
|
+
/**
|
|
30
|
+
* @description
|
|
31
|
+
* margin
|
|
32
|
+
*/
|
|
33
|
+
margin?: Gutter;
|
|
28
34
|
}
|
|
@@ -11,7 +11,7 @@ import { useClassNames } from '../../hooks/use-class-names.js';
|
|
|
11
11
|
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
12
12
|
import { useTheme } from '../theme/hooks.js';
|
|
13
13
|
import { ColorToken } from '../../utils/colors.js';
|
|
14
|
-
import clsx from '
|
|
14
|
+
import { clsx } from '@aiszlab/relax';
|
|
15
15
|
import { typography } from '../theme/theme.js';
|
|
16
16
|
import { contains } from '@aiszlab/relax/dom';
|
|
17
17
|
import { useClosable } from '../../hooks/use-closable.js';
|
|
@@ -187,7 +187,7 @@ var Popup = function Popup(_ref) {
|
|
|
187
187
|
onKeyDown = _useClosable.onKeyDown,
|
|
188
188
|
onOverlayClick = _useClosable.onOverlayClick;
|
|
189
189
|
useEffect(function () {
|
|
190
|
-
_asyncToGenerator(
|
|
190
|
+
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
191
191
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
192
192
|
while (1) switch (_context.prev = _context.next) {
|
|
193
193
|
case 0:
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { useClassNames } from '../../hooks/use-class-names.js';
|
|
4
4
|
import { EmptyClassToken } from '../../utils/class-name.js';
|
|
5
5
|
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
6
|
-
import clsx from '
|
|
6
|
+
import { clsx } from '@aiszlab/relax';
|
|
7
7
|
import { typography } from '../theme/theme.js';
|
|
8
8
|
import { useLocale } from '../../locale/use-locale.js';
|
|
9
9
|
import { ComponentToken } from '../../utils/component-token.js';
|
|
@@ -2,7 +2,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import React, { useEffect } from 'react';
|
|
4
4
|
import { FormClassToken } from '../../../utils/class-name.js';
|
|
5
|
-
import clsx from '
|
|
5
|
+
import { clsx } from '@aiszlab/relax';
|
|
6
6
|
import { useAnimate, usePresence } from 'framer-motion';
|
|
7
7
|
import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
8
8
|
import { useClassNames } from '../../../hooks/use-class-names.js';
|
|
@@ -2,10 +2,9 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import React, { useMemo, cloneElement, isValidElement } from 'react';
|
|
4
4
|
import { useController } from 'react-hook-form';
|
|
5
|
-
import { chain, isRefable } from '@aiszlab/relax';
|
|
5
|
+
import { chain, isRefable, clsx } from '@aiszlab/relax';
|
|
6
6
|
import { FormClassToken } from '../../../utils/class-name.js';
|
|
7
7
|
import { props } from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
8
|
import Layout from './layout.js';
|
|
10
9
|
import Error from './error.js';
|
|
11
10
|
import { AnimatePresence } from 'framer-motion';
|