@wonderflow/react-components 2.39.5-next.3 → 3.0.0-next.10
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/avatar/avatar.d.ts +3 -3
- package/avatar/avatar.js +4 -6
- package/avatar/avatar.module.css +1 -31
- package/button/button.js +7 -10
- package/button/button.module.css +1 -154
- package/card/card.js +3 -6
- package/card/card.module.css +1 -51
- package/chip/chip.d.ts +4 -4
- package/chip/chip.js +4 -5
- package/chip/chip.module.css +1 -60
- package/circular-progress/circular-progress.d.ts +3 -3
- package/circular-progress/circular-progress.js +4 -2
- package/circular-progress/circular-progress.module.css +1 -55
- package/clamp-text/clamp-text.js +3 -2
- package/clamp-text/clamp-text.module.css +1 -7
- package/container/container.js +3 -2
- package/container/container.module.css +1 -35
- package/core/basic.css +1 -49
- package/core/elevations.css +1 -56
- package/core/typography.css +1 -117
- package/core/{media.css → utils/media.css} +0 -0
- package/core/{vibrancy.css → utils/vibrancy.css} +0 -0
- package/core.css +1 -5
- package/disclosure/disclosure.d.ts +3 -3
- package/disclosure/disclosure.js +5 -7
- package/disclosure/disclosure.module.css +1 -93
- package/dropdown/dropdown-item.js +9 -8
- package/dropdown/dropdown-item.module.css +1 -63
- package/dropdown/dropdown-menu.d.ts +3 -3
- package/dropdown/dropdown-menu.js +6 -9
- package/dropdown/dropdown-menu.module.css +1 -13
- package/dropdown/dropdown.js +13 -14
- package/dropdown/dropdown.module.css +1 -9
- package/elevator/elevator.js +6 -5
- package/grid/grid-item.d.ts +3 -3
- package/grid/grid-item.js +3 -2
- package/grid/grid.d.ts +1 -1
- package/grid/grid.js +4 -2
- package/grid/grid.module.css +1 -29
- package/icon/icon.d.ts +3 -3
- package/icon/icon.js +3 -3
- package/icon-button/icon-button.js +3 -2
- package/icon-button/icon-button.module.css +1 -22
- package/icons/svgs/16/arrow-down-16.svg +3 -0
- package/icons/svgs/16/arrow-down-left-16.svg +3 -0
- package/icons/svgs/16/arrow-down-right-16.svg +3 -0
- package/icons/svgs/16/arrow-down-to-bracket-16.svg +3 -0
- package/icons/svgs/16/arrow-left-16.svg +3 -0
- package/icons/svgs/16/arrow-right-16.svg +3 -0
- package/icons/svgs/16/arrow-rotate-right-16.svg +3 -0
- package/icons/svgs/16/arrow-trend-down-16.svg +3 -0
- package/icons/svgs/16/arrow-trend-up-16.svg +3 -0
- package/icons/svgs/16/arrow-up-16.svg +3 -0
- package/icons/svgs/16/arrow-up-left-16.svg +3 -0
- package/icons/svgs/16/arrow-up-right-16.svg +3 -0
- package/icons/svgs/16/backward-step-16.svg +3 -0
- package/icons/svgs/16/ban-16.svg +3 -0
- package/icons/svgs/16/bars-16.svg +3 -0
- package/icons/svgs/16/bars-sort-down-16.svg +3 -0
- package/icons/svgs/16/bars-sort-up-16.svg +3 -0
- package/icons/svgs/16/bell-16.svg +3 -0
- package/icons/svgs/16/bookmark-16.svg +3 -0
- package/icons/svgs/16/calendar-16.svg +3 -0
- package/icons/svgs/16/calendar-plus-16.svg +3 -0
- package/icons/svgs/16/cart-shopping-16.svg +3 -0
- package/icons/svgs/16/check-16.svg +3 -0
- package/icons/svgs/16/chevron-down-16.svg +3 -0
- package/icons/svgs/16/chevron-left-16.svg +3 -0
- package/icons/svgs/16/chevron-right-16.svg +3 -0
- package/icons/svgs/16/chevron-up-16.svg +3 -0
- package/icons/svgs/16/circle-16.svg +3 -0
- package/icons/svgs/16/circle-check-16.svg +3 -0
- package/icons/svgs/16/circle-exclamation-16.svg +3 -0
- package/icons/svgs/16/circle-info-16.svg +3 -0
- package/icons/svgs/16/circle-question-16.svg +3 -0
- package/icons/svgs/16/circle-x-16.svg +3 -0
- package/icons/svgs/16/clock-rotate-left-16.svg +3 -0
- package/icons/svgs/16/code-16.svg +3 -0
- package/icons/svgs/16/comment-16.svg +3 -0
- package/icons/svgs/16/compass-16.svg +3 -0
- package/icons/svgs/16/crown-16.svg +3 -0
- package/icons/svgs/16/earth-europa-16.svg +3 -0
- package/icons/svgs/16/envelope-16.svg +3 -0
- package/icons/svgs/16/eye-16.svg +3 -0
- package/icons/svgs/16/eye-slash-16.svg +10 -0
- package/icons/svgs/16/facebook-16.svg +3 -0
- package/icons/svgs/16/file-16.svg +3 -0
- package/icons/svgs/16/file-alt-16.svg +3 -0
- package/icons/svgs/16/file-image-16.svg +3 -0
- package/icons/svgs/16/file-pdf-16.svg +3 -0
- package/icons/svgs/16/file-xmark-16.svg +3 -0
- package/icons/svgs/16/filter-16.svg +3 -0
- package/icons/svgs/16/forward-step-16.svg +3 -0
- package/icons/svgs/16/frown-16.svg +3 -0
- package/icons/svgs/16/gear-16.svg +3 -0
- package/icons/svgs/16/github-16.svg +3 -0
- package/icons/svgs/16/graduation-cap-16.svg +10 -0
- package/icons/svgs/16/grid-2-16.svg +3 -0
- package/icons/svgs/16/grip-vertical-16.svg +3 -0
- package/icons/svgs/16/hand-pointer-16.svg +3 -0
- package/icons/svgs/16/house-16.svg +3 -0
- package/icons/svgs/16/layer-group-16.svg +3 -0
- package/icons/svgs/16/link-16.svg +3 -0
- package/icons/svgs/16/linkedin-16.svg +3 -0
- package/icons/svgs/16/lock-16.svg +3 -0
- package/icons/svgs/16/lock-open-16.svg +10 -0
- package/icons/svgs/16/magnifying-glass-16.svg +3 -0
- package/icons/svgs/16/meh-16.svg +3 -0
- package/icons/svgs/16/message-16.svg +3 -0
- package/icons/svgs/16/minus-16.svg +3 -0
- package/icons/svgs/16/moon-16.svg +3 -0
- package/icons/svgs/16/nps-16.svg +3 -0
- package/icons/svgs/16/pause-16.svg +3 -0
- package/icons/svgs/16/pc-16.svg +3 -0
- package/icons/svgs/16/play-16.svg +3 -0
- package/icons/svgs/16/plus-16.svg +3 -0
- package/icons/svgs/16/rectangle-barcode-16.svg +3 -0
- package/icons/svgs/16/right-from-bracket-16.svg +3 -0
- package/icons/svgs/16/share-from-square-16.svg +10 -0
- package/icons/svgs/16/signal-stream-16.svg +3 -0
- package/icons/svgs/16/smile-16.svg +3 -0
- package/icons/svgs/16/smile-rotate-right-16.svg +10 -0
- package/icons/svgs/16/sort-16.svg +3 -0
- package/icons/svgs/16/sort-alt-16.svg +3 -0
- package/icons/svgs/16/sort-down-16.svg +3 -0
- package/icons/svgs/16/sort-left-16.svg +3 -0
- package/icons/svgs/16/sort-right-16.svg +3 -0
- package/icons/svgs/16/sort-up-16.svg +3 -0
- package/icons/svgs/16/star-16.svg +3 -0
- package/icons/svgs/16/stop-16.svg +3 -0
- package/icons/svgs/16/sun-bright-16.svg +3 -0
- package/icons/svgs/16/tags-16.svg +3 -0
- package/icons/svgs/16/text-slash-16.svg +10 -0
- package/icons/svgs/16/thumbs-down-16.svg +3 -0
- package/icons/svgs/16/thumbs-up-16.svg +3 -0
- package/icons/svgs/16/thumbtack-16.svg +3 -0
- package/icons/svgs/16/triangle-exclamation-16.svg +3 -0
- package/icons/svgs/16/turn-down-right-16.svg +3 -0
- package/icons/svgs/16/twitter-16.svg +10 -0
- package/icons/svgs/16/user-16.svg +3 -0
- package/icons/svgs/16/wave-sine-16.svg +3 -0
- package/icons/svgs/16/xmark-16.svg +3 -0
- package/icons/svgs/24/arrow-down-24.svg +3 -0
- package/icons/svgs/24/arrow-down-left-24.svg +3 -0
- package/icons/svgs/24/arrow-down-right-24.svg +3 -0
- package/icons/svgs/24/arrow-down-to-bracket-24.svg +3 -0
- package/icons/svgs/24/arrow-left-24.svg +3 -0
- package/icons/svgs/24/arrow-right-24.svg +3 -0
- package/icons/svgs/24/arrow-rotate-right-24.svg +3 -0
- package/icons/svgs/24/arrow-trend-down-24.svg +3 -0
- package/icons/svgs/24/arrow-trend-up-24.svg +3 -0
- package/icons/svgs/24/arrow-up-24.svg +3 -0
- package/icons/svgs/24/arrow-up-left-24.svg +3 -0
- package/icons/svgs/24/arrow-up-right-24.svg +3 -0
- package/icons/svgs/24/backward-step-24.svg +3 -0
- package/icons/svgs/24/ban-24.svg +3 -0
- package/icons/svgs/24/bars-24.svg +3 -0
- package/icons/svgs/24/bars-sort-down-24.svg +3 -0
- package/icons/svgs/24/bars-sort-up-24.svg +3 -0
- package/icons/svgs/24/bell-24.svg +3 -0
- package/icons/svgs/24/bookmark-24.svg +3 -0
- package/icons/svgs/24/calendar-24.svg +3 -0
- package/icons/svgs/24/calendar-plus-24.svg +3 -0
- package/icons/svgs/24/cart-shopping-24.svg +3 -0
- package/icons/svgs/24/check-24.svg +3 -0
- package/icons/svgs/24/chevron-down-24.svg +3 -0
- package/icons/svgs/24/chevron-left-24.svg +3 -0
- package/icons/svgs/24/chevron-right-24.svg +3 -0
- package/icons/svgs/24/chevron-up-24.svg +3 -0
- package/icons/svgs/24/circle-24.svg +3 -0
- package/icons/svgs/24/circle-check-24.svg +3 -0
- package/icons/svgs/24/circle-exclamation-24.svg +3 -0
- package/icons/svgs/24/circle-info-24.svg +3 -0
- package/icons/svgs/24/circle-question-24.svg +3 -0
- package/icons/svgs/24/circle-x-24.svg +3 -0
- package/icons/svgs/24/clock-rotate-left-24.svg +3 -0
- package/icons/svgs/24/code-24.svg +3 -0
- package/icons/svgs/24/comment-24.svg +3 -0
- package/icons/svgs/24/compass-24.svg +3 -0
- package/icons/svgs/24/crown-24.svg +3 -0
- package/icons/svgs/24/earth-europa-24.svg +3 -0
- package/icons/svgs/24/envelope-24.svg +3 -0
- package/icons/svgs/24/eye-24.svg +3 -0
- package/icons/svgs/24/eye-slash-24.svg +3 -0
- package/icons/svgs/24/facebook-24.svg +3 -0
- package/icons/svgs/24/file-24.svg +3 -0
- package/icons/svgs/24/file-alt-24.svg +3 -0
- package/icons/svgs/24/file-image-24.svg +3 -0
- package/icons/svgs/24/file-pdf-24.svg +3 -0
- package/icons/svgs/24/file-xmark-24.svg +3 -0
- package/icons/svgs/24/filter-24.svg +3 -0
- package/icons/svgs/24/forward-step-24.svg +3 -0
- package/icons/svgs/24/frown-24.svg +3 -0
- package/icons/svgs/24/gear-24.svg +3 -0
- package/icons/svgs/24/github-24.svg +3 -0
- package/icons/svgs/24/graduation-cap-24.svg +3 -0
- package/icons/svgs/24/grid-2-24.svg +3 -0
- package/icons/svgs/24/grip-vertical-24.svg +3 -0
- package/icons/svgs/24/hand-pointer-24.svg +3 -0
- package/icons/svgs/24/house-24.svg +3 -0
- package/icons/svgs/24/layer-group-24.svg +3 -0
- package/icons/svgs/24/link-24.svg +3 -0
- package/icons/svgs/24/linkedin-24.svg +3 -0
- package/icons/svgs/24/lock-24.svg +3 -0
- package/icons/svgs/24/lock-open-24.svg +3 -0
- package/icons/svgs/24/magnifying-glass-24.svg +3 -0
- package/icons/svgs/24/meh-24.svg +3 -0
- package/icons/svgs/24/message-24.svg +3 -0
- package/icons/svgs/24/minus-24.svg +3 -0
- package/icons/svgs/24/moon-24.svg +3 -0
- package/icons/svgs/24/nps-24.svg +3 -0
- package/icons/svgs/24/pause-24.svg +3 -0
- package/icons/svgs/24/pc-24.svg +3 -0
- package/icons/svgs/24/play-24.svg +3 -0
- package/icons/svgs/24/plus-24.svg +3 -0
- package/icons/svgs/24/rectangle-barcode-24.svg +3 -0
- package/icons/svgs/24/right-from-bracket-24.svg +3 -0
- package/icons/svgs/24/share-from-square-24.svg +3 -0
- package/icons/svgs/24/signal-stream-24.svg +3 -0
- package/icons/svgs/24/smile-24.svg +3 -0
- package/icons/svgs/24/smile-rotate-right-24.svg +3 -0
- package/icons/svgs/24/sort-24.svg +3 -0
- package/icons/svgs/24/sort-alt-24.svg +3 -0
- package/icons/svgs/24/sort-down-24.svg +3 -0
- package/icons/svgs/24/sort-left-24.svg +3 -0
- package/icons/svgs/24/sort-right-24.svg +3 -0
- package/icons/svgs/24/sort-up-24.svg +3 -0
- package/icons/svgs/24/star-24.svg +3 -0
- package/icons/svgs/24/stop-24.svg +3 -0
- package/icons/svgs/24/sun-bright-24.svg +3 -0
- package/icons/svgs/24/tags-24.svg +3 -0
- package/icons/svgs/24/text-slash-24.svg +3 -0
- package/icons/svgs/24/thumbs-down-24.svg +3 -0
- package/icons/svgs/24/thumbs-up-24.svg +3 -0
- package/icons/svgs/24/thumbtack-24.svg +3 -0
- package/icons/svgs/24/triangle-exclamation-24.svg +3 -0
- package/icons/svgs/24/turn-down-right-24.svg +3 -0
- package/icons/svgs/24/twitter-24.svg +3 -0
- package/icons/svgs/24/user-24.svg +3 -0
- package/icons/svgs/24/wave-sine-24.svg +3 -0
- package/icons/svgs/24/xmark-24.svg +3 -0
- package/index.d.ts +78 -40
- package/index.js +2 -3
- package/info-state/info-state.d.ts +4 -4
- package/info-state/info-state.js +4 -9
- package/info-state/info-state.module.css +1 -77
- package/input-group/input-group.d.ts +3 -3
- package/input-group/input-group.js +11 -14
- package/input-group/input-group.module.css +1 -33
- package/linear-progress/linear-progress.d.ts +3 -3
- package/linear-progress/linear-progress.js +7 -7
- package/linear-progress/linear-progress.module.css +1 -81
- package/list/list.js +3 -4
- package/list/list.module.css +1 -55
- package/masonry/masonry.js +5 -4
- package/masonry/masonry.module.css +1 -14
- package/modal/content/modal-content.d.ts +9 -0
- package/modal/content/modal-content.js +11 -0
- package/modal/content/modal-content.module.css +1 -0
- package/modal/index.d.ts +1 -1
- package/modal/index.js +1 -1
- package/modal/modal-context.d.ts +4 -4
- package/modal/modal-context.js +10 -0
- package/modal/modal.d.ts +2 -3
- package/modal/modal.js +8 -22
- package/modal/modal.module.css +1 -48
- package/overlay-container/index.d.ts +2 -0
- package/overlay-container/index.js +1 -0
- package/overlay-container/overlay-container.d.ts +7 -0
- package/overlay-container/overlay-container.js +13 -0
- package/package.json +36 -27
- package/pagination/pagination.js +3 -2
- package/pagination/pagination.module.css +1 -31
- package/prose/prose.js +3 -2
- package/prose/prose.module.css +1 -23
- package/select/select.d.ts +3 -3
- package/select/select.js +4 -6
- package/select/select.module.css +1 -108
- package/selection-controls/checkbox.d.ts +3 -3
- package/selection-controls/checkbox.js +4 -2
- package/selection-controls/radio.d.ts +3 -3
- package/selection-controls/radio.js +4 -2
- package/selection-controls/selection-controls.module.css +1 -119
- package/selection-controls/toggle.d.ts +3 -3
- package/selection-controls/toggle.js +4 -2
- package/separator/separator.d.ts +2 -2
- package/separator/separator.js +4 -2
- package/separator/separator.module.css +1 -6
- package/skeleton-block/skeleton-block.js +2 -2
- package/slider/slider.d.ts +3 -3
- package/slider/slider.js +4 -7
- package/slider/slider.module.css +1 -101
- package/snackbar/snackbar.js +3 -10
- package/snackbar/snackbar.module.css +1 -46
- package/spinner/spinner.d.ts +3 -3
- package/spinner/spinner.js +5 -7
- package/split-button/split-button.js +3 -4
- package/split-button/split-button.module.css +1 -28
- package/stack/stack.js +3 -2
- package/stack/stack.module.css +1 -27
- package/star-meter/star-meter.js +4 -12
- package/star-meter/star-meter.module.css +1 -30
- package/tab/primitive-tab.d.ts +1 -1
- package/tab/primitive-tab.js +3 -3
- package/tab/tab-item.d.ts +3 -3
- package/tab/tab-item.js +4 -4
- package/tab/tab-list.d.ts +2 -2
- package/tab/tab-list.js +4 -3
- package/tab/tab-panel.d.ts +3 -3
- package/tab/tab-panel.js +4 -2
- package/tab/tab.d.ts +1 -1
- package/tab/tab.js +7 -8
- package/tab/tab.module.css +1 -103
- package/table/table.js +7 -9
- package/table/table.module.css +1 -28
- package/text/text.d.ts +1 -0
- package/text/text.js +4 -3
- package/text/text.module.css +1 -82
- package/textfield/base-field/base-field.js +3 -2
- package/textfield/base-field/base-field.module.css +1 -119
- package/textfield/textfield.d.ts +3 -3
- package/textfield/textfield.js +6 -9
- package/textfield/textfield.module.css +1 -103
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +1 -143
- package/title/title.d.ts +1 -0
- package/title/title.js +4 -3
- package/title/title.module.css +1 -82
- package/toggle-button/toggle-button.js +6 -5
- package/toggle-button/toggle-button.module.css +1 -51
- package/tooltip/tooltip.js +6 -10
- package/tooltip/tooltip.module.css +1 -72
- package/modal/modal-content.d.ts +0 -7
- package/modal/modal-content.js +0 -14
- package/modal/modal-content.module.css +0 -40
- package/theme-switch/index.d.ts +0 -2
- package/theme-switch/index.js +0 -1
- package/theme-switch/theme-switch.d.ts +0 -9
- package/theme-switch/theme-switch.js +0 -14
package/avatar/avatar.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ImgHTMLAttributes } from 'react';
|
|
2
2
|
export declare type AvatarProps = ImgHTMLAttributes<HTMLImageElement> & {
|
|
3
3
|
src?: string;
|
|
4
4
|
dimension?: 'small' | 'regular' | 'big';
|
|
5
5
|
};
|
|
6
|
-
export declare const Avatar:
|
|
6
|
+
export declare const Avatar: import("react").ForwardRefExoticComponent<ImgHTMLAttributes<HTMLImageElement> & {
|
|
7
7
|
src?: string | undefined;
|
|
8
8
|
dimension?: "big" | "small" | "regular" | undefined;
|
|
9
|
-
} &
|
|
9
|
+
} & import("react").RefAttributes<HTMLImageElement>>;
|
package/avatar/avatar.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import clsx from 'clsx';
|
|
2
|
-
import
|
|
3
|
+
import { forwardRef } from 'react';
|
|
3
4
|
import { Avatar as AvatarClass, Placeholder } from './avatar.module.css';
|
|
4
5
|
export const Avatar = forwardRef(({ className, src, dimension = 'regular', ...otherProps }, forwardedRef) => {
|
|
5
|
-
return (
|
|
6
|
-
React.createElement("svg", { "aria-hidden": "true", className: Placeholder, height: 18, viewBox: "0 0 12 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
7
|
-
React.createElement("path", { opacity: 0.7, d: "M6 0C3.795 0 2 1.794 2 4s1.795 4 4 4 4-1.794 4-4-1.795-4-4-4z", fill: "var(--highlight-blue-foreground)" }),
|
|
8
|
-
React.createElement("path", { d: "M8.4 9H3.6C1.612 9 0 10.575 0 12.531v5.126C1.814 18.517 3.85 19 6 19s4.186-.483 6-1.343v-5.126C12 10.581 10.394 9 8.4 9z", fill: "var(--highlight-blue-foreground)" })),
|
|
9
|
-
src && (React.createElement("img", { ref: forwardedRef, alt: "", src: src, ...otherProps }))));
|
|
6
|
+
return (_jsxs("picture", { className: clsx(AvatarClass, className), "data-avatar-dimension": dimension, children: [_jsxs("svg", { "aria-hidden": "true", className: Placeholder, height: 18, viewBox: "0 0 12 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { opacity: 0.7, d: "M6 0C3.795 0 2 1.794 2 4s1.795 4 4 4 4-1.794 4-4-1.795-4-4-4z", fill: "var(--highlight-blue-foreground)" }, void 0), _jsx("path", { d: "M8.4 9H3.6C1.612 9 0 10.575 0 12.531v5.126C1.814 18.517 3.85 19 6 19s4.186-.483 6-1.343v-5.126C12 10.581 10.394 9 8.4 9z", fill: "var(--highlight-blue-foreground)" }, void 0)] }, void 0), src && (_jsx("img", { ref: forwardedRef, alt: "", src: src, ...otherProps }, void 0))] }, void 0));
|
|
10
7
|
});
|
|
8
|
+
Avatar.displayName = 'Avatar';
|
package/avatar/avatar.module.css
CHANGED
|
@@ -1,31 +1 @@
|
|
|
1
|
-
.Avatar {
|
|
2
|
-
--size: env(--space-24);
|
|
3
|
-
|
|
4
|
-
position: relative;
|
|
5
|
-
inline-size: var(--size);
|
|
6
|
-
aspect-ratio: 1 / 1;
|
|
7
|
-
border-radius: 100%;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
background-color: var(--highlight-blue-background);
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: flex-end;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
|
|
14
|
-
&[data-avatar-dimension='regular'] {
|
|
15
|
-
--size: env(--space-40);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&[data-avatar-dimension='big'] {
|
|
19
|
-
--size: env(--space-48);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
& img {
|
|
23
|
-
position: absolute;
|
|
24
|
-
inset: 0;
|
|
25
|
-
object-fit: cover;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.Placeholder {
|
|
30
|
-
height: calc(var(--size) - 25%);
|
|
31
|
-
}
|
|
1
|
+
.Avatar{--size:1.33rem;align-items:flex-end;aspect-ratio:1/1;background-color:var(--highlight-blue-background);border-radius:100%;display:flex;inline-size:var(--size);justify-content:center;overflow:hidden;position:relative}.Avatar[data-avatar-dimension=regular]{--size:2.22rem}.Avatar[data-avatar-dimension=big]{--size:2.67rem}.Avatar img{bottom:0;left:0;object-fit:cover;position:absolute;right:0;top:0}.Placeholder{height:calc(var(--size) - 25%)}
|
package/button/button.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import clsx from 'clsx';
|
|
2
|
-
import
|
|
3
|
+
import { Children, cloneElement, forwardRef, useCallback } from 'react';
|
|
3
4
|
import { Icon, Spinner } from '../';
|
|
4
5
|
import { Button as ButtonClass, SpinnerIndicator, ButtonsGroup as ButtonsGroupClass } from './button.module.css';
|
|
5
6
|
export const Button = forwardRef(({ kind = 'primary', dimension = 'regular', className, children, fullWidth, icon, disabled, iconPosition = 'left', iconColor, type = 'button', pressed, onClick, busy, as: Wrapper = 'button', ...otherProps }, forwardedRef) => {
|
|
@@ -14,13 +15,9 @@ export const Button = forwardRef(({ kind = 'primary', dimension = 'regular', cla
|
|
|
14
15
|
regular: 16,
|
|
15
16
|
small: 16
|
|
16
17
|
};
|
|
17
|
-
return (
|
|
18
|
-
icon && (React.createElement(Icon, { name: icon, fill: iconColor, dimension: iconSize[dimension] })),
|
|
19
|
-
(children && busy) ? React.createElement("span", null, children) : children,
|
|
20
|
-
busy && (React.createElement("span", { className: SpinnerIndicator },
|
|
21
|
-
React.createElement(Spinner, { dimension: dimension })))));
|
|
18
|
+
return (_jsxs(Wrapper, { ref: forwardedRef, type: Wrapper === 'button' ? type : undefined, className: clsx(ButtonClass, className), "data-button-icon-position": iconPosition, "data-button-dimension": dimension, "data-button-kind": kind, "data-button-fullwidth": fullWidth, "aria-disabled": disabled, "aria-busy": busy, "aria-pressed": Wrapper === 'button' ? pressed : undefined, "aria-live": busy ? 'polite' : undefined, onClick: handleClick(), ...otherProps, children: [icon && (_jsx(Icon, { name: icon, fill: iconColor, dimension: iconSize[dimension] }, void 0)), (children && busy) ? _jsx("span", { children: children }, void 0) : children, busy && (_jsx("span", { className: SpinnerIndicator, children: _jsx(Spinner, { dimension: dimension }, void 0) }, void 0))] }, void 0));
|
|
22
19
|
});
|
|
23
|
-
export const ButtonsGroup = ({ children, className, kind, dimension = 'regular' }) => (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}))));
|
|
20
|
+
export const ButtonsGroup = ({ children, className, kind, dimension = 'regular' }) => (_jsx("div", { className: clsx(ButtonsGroupClass, className), children: Children.map(children, (child) => cloneElement(child, {
|
|
21
|
+
kind,
|
|
22
|
+
dimension
|
|
23
|
+
})) }, void 0));
|
package/button/button.module.css
CHANGED
|
@@ -1,154 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.Button {
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
user-select: none;
|
|
6
|
-
-webkit-touch-callout: none;
|
|
7
|
-
margin: 0;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
font-family: inherit;
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
min-inline-size: min-content;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
text-decoration: none;
|
|
15
|
-
white-space: nowrap;
|
|
16
|
-
border: 0;
|
|
17
|
-
appearance: none;
|
|
18
|
-
font-weight: 600;
|
|
19
|
-
position: relative;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
border-radius: env(--radius-4);
|
|
22
|
-
background: none;
|
|
23
|
-
grid-gap: env(--space-8);
|
|
24
|
-
|
|
25
|
-
/* Sizes */
|
|
26
|
-
|
|
27
|
-
&[data-button-dimension='big'] {
|
|
28
|
-
padding: 0.55rem env(--space-24) 0.66rem;
|
|
29
|
-
font-size: env(--font-size-18);
|
|
30
|
-
block-size: env(--space-48);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&[data-button-dimension='regular'] {
|
|
34
|
-
padding: 0.33rem env(--space-16) env(--space-8);
|
|
35
|
-
font-size: env(--font-size-16);
|
|
36
|
-
block-size: env(--space-40);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&[data-button-dimension='small'] {
|
|
40
|
-
font-size: env(--font-size-14);
|
|
41
|
-
padding: 0 env(--space-4) 0.11rem;
|
|
42
|
-
block-size: env(--space-24);
|
|
43
|
-
grid-gap: env(--space-4);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* Types */
|
|
47
|
-
|
|
48
|
-
&[data-button-kind='primary'] {
|
|
49
|
-
background: var(--cta-default);
|
|
50
|
-
color: var(--cta-foreground);
|
|
51
|
-
|
|
52
|
-
&:not([aria-pressed='true'], [aria-disabled='true']):is(:active) {
|
|
53
|
-
background: var(--cta-dark);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:where([aria-pressed='true']),
|
|
57
|
-
&:where([aria-pressed='true']:active) {
|
|
58
|
-
background: hsl(env(--color-red-50));
|
|
59
|
-
color: hsl(env(--color-support-white));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&[data-button-kind='secondary'] {
|
|
64
|
-
|
|
65
|
-
@mixin vibrancy;
|
|
66
|
-
|
|
67
|
-
color: var(--global-vibrancy-foreground);
|
|
68
|
-
|
|
69
|
-
&:not([aria-pressed='true'], [aria-disabled='true']):is(:active) {
|
|
70
|
-
|
|
71
|
-
@mixin vibrancy-hover;
|
|
72
|
-
|
|
73
|
-
color: var(--global-vibrancy-foreground);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&:where([aria-pressed='true']),
|
|
77
|
-
&:where([aria-pressed='true']:active) {
|
|
78
|
-
color: var(--dimmed-0);
|
|
79
|
-
background: var(--dimmed-7);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&[data-button-kind='flat'] {
|
|
84
|
-
color: var(--global-vibrancy-foreground);
|
|
85
|
-
|
|
86
|
-
&:not([aria-pressed='true'], [aria-disabled='true']):is(:active) {
|
|
87
|
-
|
|
88
|
-
@mixin vibrancy-hover;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&:is(:hover, :focus) {
|
|
92
|
-
|
|
93
|
-
@mixin vibrancy;
|
|
94
|
-
|
|
95
|
-
color: var(--global-vibrancy-foreground);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&:where([aria-pressed='true']),
|
|
99
|
-
&:where([aria-pressed='true']:is(:active, :focus)) {
|
|
100
|
-
color: var(--dimmed-0);
|
|
101
|
-
background: var(--dimmed-7);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* Styles */
|
|
106
|
-
|
|
107
|
-
&[data-button-fullwidth='true'] {
|
|
108
|
-
inline-size: 100%;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&[data-button-icon-position='right'] {
|
|
112
|
-
flex-direction: row-reverse;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&[aria-disabled='true'],
|
|
116
|
-
&[aria-disabled='true']:is(:hover, :focus, :active) {
|
|
117
|
-
|
|
118
|
-
@mixin vibrancy-disabled;
|
|
119
|
-
|
|
120
|
-
cursor: not-allowed;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&[aria-busy='true'] > :not(.SpinnerIndicator) {
|
|
124
|
-
visibility: hidden;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.SpinnerIndicator {
|
|
129
|
-
position: absolute;
|
|
130
|
-
inset: 0;
|
|
131
|
-
display: grid;
|
|
132
|
-
place-content: center;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
.ButtonsGroup {
|
|
137
|
-
display: inline-flex;
|
|
138
|
-
|
|
139
|
-
& > *:not(:first-child, :last-child, :only-of-type) {
|
|
140
|
-
border-radius: 0;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
& > *:first-child:not(:only-of-type) {
|
|
144
|
-
border-top-right-radius: 0;
|
|
145
|
-
border-bottom-right-radius: 0;
|
|
146
|
-
box-shadow: inset -1px 0 0 hsl(0deg 0% 40% / 10%);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
& > *:last-child:not(:only-of-type) {
|
|
150
|
-
border-top-left-radius: 0;
|
|
151
|
-
border-bottom-left-radius: 0;
|
|
152
|
-
box-shadow: inset 1px 0 0 hsl(0deg 0% 40% / 10%);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
1
|
+
.Button{-webkit-touch-callout:none;grid-gap:.44rem;align-items:center;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:.22rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;-webkit-user-select:none;user-select:none;white-space:nowrap}.Button[data-button-dimension=big]{block-size:2.67rem;font-size:1rem;padding:.55rem 1.33rem .66rem}.Button[data-button-dimension=regular]{block-size:2.22rem;font-size:.89rem;padding:.33rem .89rem .44rem}.Button[data-button-dimension=small]{grid-gap:.22rem;block-size:1.33rem;font-size:.78rem;padding:0 .22rem .11rem}.Button[data-button-kind=primary]{background:var(--cta-default);color:var(--cta-foreground)}.Button[data-button-kind=primary]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background:var(--cta-dark)}.Button[data-button-kind=primary]:where([aria-pressed=true]),.Button[data-button-kind=primary]:where([aria-pressed=true]:active){background:#9e0018;color:#fff}.Button[data-button-kind=secondary]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-vibrancy-background),var(--global-vibrancy-background));color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background:linear-gradient(to bottom,var(--global-vibrancy-background-hover),var(--global-vibrancy-background-hover));color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:where([aria-pressed=true]),.Button[data-button-kind=secondary]:where([aria-pressed=true]:active){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=flat]{color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:not([aria-pressed=true],[aria-disabled=true]):is(:active){background:linear-gradient(to bottom,var(--global-vibrancy-background-hover),var(--global-vibrancy-background-hover))}.Button[data-button-kind=flat]:is(:hover,:focus){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-vibrancy-background),var(--global-vibrancy-background));color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:where([aria-pressed=true]),.Button[data-button-kind=flat]:where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-fullwidth=true]{inline-size:100%}.Button[data-button-icon-position=right]{flex-direction:row-reverse}.Button[aria-disabled=true],.Button[aria-disabled=true]:is(:hover,:focus,:active){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));color:var(--global-disabled-foreground);cursor:not-allowed}.Button[aria-busy=true]>:not(.SpinnerIndicator){visibility:hidden}.SpinnerIndicator{align-content:center;bottom:0;display:grid;justify-content:center;left:0;place-content:center;position:absolute;right:0;top:0}.ButtonsGroup{display:inline-flex}.ButtonsGroup>:not(:first-child,:last-child,:only-of-type){border-radius:0}.ButtonsGroup>:first-child:not(:only-of-type){border-bottom-right-radius:0;border-top-right-radius:0;box-shadow:inset -1px 0 0 #6666661a}.ButtonsGroup>:last-child:not(:only-of-type){border-bottom-left-radius:0;border-top-left-radius:0;box-shadow:inset 1px 0 0 #6666661a}
|
package/card/card.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import tkns from '@wonderflow/tokens/platforms/web/tokens.json';
|
|
3
4
|
import { Stack } from '../';
|
|
4
5
|
import clsx from 'clsx';
|
|
@@ -8,9 +9,5 @@ export const Card = forwardRef(({ as: Wrapper = 'div', children, className, padd
|
|
|
8
9
|
'--padding': padding && tkns.space[padding],
|
|
9
10
|
'--radius': radius && tkns.radius[radius]
|
|
10
11
|
};
|
|
11
|
-
return (
|
|
12
|
-
React.createElement(Stack, { direction: "row", fill: false, verticalAlign: verticalAlign, horizontalAlign: horizontalAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap },
|
|
13
|
-
left && React.createElement("div", { className: Left }, left),
|
|
14
|
-
children && (React.createElement("div", { className: Content }, children)),
|
|
15
|
-
right && (React.createElement(Stack, { className: Right }, right)))));
|
|
12
|
+
return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(CardClass, className), style: { ...dynamicStyle, ...style }, "data-card-dimmed": dimmed, "data-card-bordered": bordered, "data-card-vibrant": vibrant, "data-card-highlight-hover": highlightOnHover, ...otherProps, children: _jsxs(Stack, { direction: "row", fill: false, verticalAlign: verticalAlign, horizontalAlign: horizontalAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap, children: [left && _jsx("div", { className: Left, children: left }, void 0), children && (_jsx("div", { className: Content, children: children }, void 0)), right && (_jsx(Stack, { className: Right, children: right }, void 0))] }, void 0) }, void 0));
|
|
16
13
|
});
|
package/card/card.module.css
CHANGED
|
@@ -1,51 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
:where(.Card) {
|
|
4
|
-
background: var(--global-background);
|
|
5
|
-
padding: var(--padding);
|
|
6
|
-
border-radius: var(--radius);
|
|
7
|
-
position: relative;
|
|
8
|
-
|
|
9
|
-
&[data-card-dimmed='1'] {
|
|
10
|
-
background: var(--dimmed-0);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&[data-card-dimmed='2'] {
|
|
14
|
-
background: var(--dimmed-1);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&[data-card-dimmed='3'] {
|
|
18
|
-
background: var(--dimmed-2);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&[data-card-vibrant='true'] {
|
|
22
|
-
|
|
23
|
-
@mixin vibrancy;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&[data-card-highlight-hover='true'][data-card-vibrant='true']:hover,
|
|
27
|
-
&[data-card-highlight-hover='true'][data-card-vibrant='true']:focus-visible {
|
|
28
|
-
|
|
29
|
-
@mixin vibrancy-hover;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&[data-card-bordered='true'] {
|
|
33
|
-
border: solid 1px var(--dimmed-1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&[data-card-vibrant='true'][data-card-bordered='true'] {
|
|
37
|
-
border: solid 1px var(--dimmed-2);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.Left {
|
|
42
|
-
flex-shrink: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.Content {
|
|
46
|
-
flex-grow: 1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.Right {
|
|
50
|
-
flex-shrink: 0;
|
|
51
|
-
}
|
|
1
|
+
:where(.Card){background:var(--global-background);border-radius:var(--radius);padding:var(--padding);position:relative}:where(.Card)[data-card-dimmed="1"]{background:var(--dimmed-0)}:where(.Card)[data-card-dimmed="2"]{background:var(--dimmed-1)}:where(.Card)[data-card-dimmed="3"]{background:var(--dimmed-2)}:where(.Card)[data-card-vibrant=true]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-vibrancy-background),var(--global-vibrancy-background))}:where(.Card)[data-card-highlight-hover=true][data-card-vibrant=true].focus-visible,:where(.Card)[data-card-highlight-hover=true][data-card-vibrant=true]:hover{background:linear-gradient(to bottom,var(--global-vibrancy-background-hover),var(--global-vibrancy-background-hover))}:where(.Card)[data-card-highlight-hover=true][data-card-vibrant=true]:focus-visible,:where(.Card)[data-card-highlight-hover=true][data-card-vibrant=true]:hover{background:linear-gradient(to bottom,var(--global-vibrancy-background-hover),var(--global-vibrancy-background-hover))}:where(.Card)[data-card-bordered=true]{border:1px solid var(--dimmed-1)}:where(.Card)[data-card-vibrant=true][data-card-bordered=true]{border:1px solid var(--dimmed-2)}.Left{flex-shrink:0}.Content{flex-grow:1}.Right{flex-shrink:0}
|
package/chip/chip.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
export declare type ChipProps = PropsWithChildren<PropsWithClass> & {
|
|
3
3
|
dimension?: 'small' | 'regular' | 'big';
|
|
4
4
|
color?: 'gray' | 'cyan' | 'green' | 'purple' | 'yellow' | 'red' | 'blue';
|
|
5
5
|
interactive?: boolean;
|
|
6
6
|
onDismissClick?(): void;
|
|
7
7
|
};
|
|
8
|
-
export declare const Chip:
|
|
9
|
-
children?:
|
|
8
|
+
export declare const Chip: import("react").ForwardRefExoticComponent<PropsWithClass & {
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
10
|
} & {
|
|
11
11
|
dimension?: "big" | "small" | "regular" | undefined;
|
|
12
12
|
color?: "gray" | "cyan" | "green" | "purple" | "yellow" | "red" | "blue" | undefined;
|
|
13
13
|
interactive?: boolean | undefined;
|
|
14
14
|
onDismissClick?(): void;
|
|
15
|
-
} &
|
|
15
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
package/chip/chip.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import clsx from 'clsx';
|
|
2
|
-
import
|
|
3
|
+
import { forwardRef } from 'react';
|
|
3
4
|
import { Icon, Stack } from '../';
|
|
4
5
|
import { Chip as ChipClass, Action } from './chip.module.css';
|
|
5
6
|
export const Chip = forwardRef(({ children, className, dimension = 'regular', color = 'gray', interactive, onDismissClick, ...otherProps }, forwardedRef) => {
|
|
@@ -14,8 +15,6 @@ export const Chip = forwardRef(({ children, className, dimension = 'regular', co
|
|
|
14
15
|
iconSize: 16
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
|
-
return (
|
|
18
|
-
React.createElement("b", null, children),
|
|
19
|
-
interactive && (React.createElement("button", { onClick: interactive && onDismissClick, className: Action, type: "button" },
|
|
20
|
-
React.createElement(Icon, { name: "xmark", dimension: properties[dimension].iconSize })))));
|
|
18
|
+
return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, inline: true, "data-chip-color": color, "data-chip-dimension": dimension, className: clsx(ChipClass, className), verticalAlign: "center", ref: forwardedRef, ...otherProps, children: [_jsx("b", { children: children }, void 0), interactive && (_jsx("button", { onClick: interactive && onDismissClick, className: Action, type: "button", children: _jsx(Icon, { name: "xmark", dimension: properties[dimension].iconSize }, void 0) }, void 0))] }, void 0));
|
|
21
19
|
});
|
|
20
|
+
Chip.displayName = 'Chip';
|
package/chip/chip.module.css
CHANGED
|
@@ -1,60 +1 @@
|
|
|
1
|
-
.Chip {
|
|
2
|
-
padding: 2px env(--space-8) env(--space-4);
|
|
3
|
-
border-radius: env(--radius-48);
|
|
4
|
-
background-color: var(--highlight-gray-background);
|
|
5
|
-
color: var(--highlight-gray-foreground);
|
|
6
|
-
font-size: env(--font-size-16);
|
|
7
|
-
block-size: env(--space-32);
|
|
8
|
-
font-weight: 600;
|
|
9
|
-
|
|
10
|
-
&[data-chip-dimension='small'] {
|
|
11
|
-
block-size: env(--space-24);
|
|
12
|
-
font-size: env(--font-size-14);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&[data-chip-dimension='big'] {
|
|
16
|
-
font-size: env(--font-size-18);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&[data-chip-color='cyan'] {
|
|
20
|
-
background-color: var(--highlight-cyan-background);
|
|
21
|
-
color: var(--highlight-cyan-foreground);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&[data-chip-color='green'] {
|
|
25
|
-
background-color: var(--highlight-green-background);
|
|
26
|
-
color: var(--highlight-green-foreground);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&[data-chip-color='purple'] {
|
|
30
|
-
background-color: var(--highlight-purple-background);
|
|
31
|
-
color: var(--highlight-purple-foreground);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&[data-chip-color='yellow'] {
|
|
35
|
-
background-color: var(--highlight-yellow-background);
|
|
36
|
-
color: var(--highlight-yellow-foreground);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&[data-chip-color='red'] {
|
|
40
|
-
background-color: var(--highlight-red-background);
|
|
41
|
-
color: var(--highlight-red-foreground);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&[data-chip-color='blue'] {
|
|
45
|
-
background-color: var(--highlight-blue-background);
|
|
46
|
-
color: var(--highlight-blue-foreground);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.Action {
|
|
51
|
-
display: inline-flex;
|
|
52
|
-
appearance: none;
|
|
53
|
-
border: 0;
|
|
54
|
-
background: none;
|
|
55
|
-
padding: 0;
|
|
56
|
-
color: inherit;
|
|
57
|
-
font: inherit;
|
|
58
|
-
margin-top: 1px;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
}
|
|
1
|
+
.Chip{background-color:var(--highlight-gray-background);block-size:1.78rem;border-radius:2.67rem;color:var(--highlight-gray-foreground);font-size:.89rem;font-weight:600;padding:2px .44rem .22rem}.Chip[data-chip-dimension=small]{block-size:1.33rem;font-size:.78rem}.Chip[data-chip-dimension=big]{font-size:1rem}.Chip[data-chip-color=cyan]{background-color:var(--highlight-cyan-background);color:var(--highlight-cyan-foreground)}.Chip[data-chip-color=green]{background-color:var(--highlight-green-background);color:var(--highlight-green-foreground)}.Chip[data-chip-color=purple]{background-color:var(--highlight-purple-background);color:var(--highlight-purple-foreground)}.Chip[data-chip-color=yellow]{background-color:var(--highlight-yellow-background);color:var(--highlight-yellow-foreground)}.Chip[data-chip-color=red]{background-color:var(--highlight-red-background);color:var(--highlight-red-foreground)}.Chip[data-chip-color=blue]{background-color:var(--highlight-blue-background);color:var(--highlight-blue-foreground)}.Action{-webkit-appearance:none;appearance:none;background:none;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;margin-top:1px;padding:0}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export declare type CircularProgressProps = PropsWithClass & {
|
|
3
3
|
value: number;
|
|
4
4
|
max?: number;
|
|
5
5
|
dimension?: 'small' | 'regular' | 'big';
|
|
6
6
|
showProgress?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const CircularProgress:
|
|
8
|
+
export declare const CircularProgress: import("react").ForwardRefExoticComponent<PropsWithClass & {
|
|
9
9
|
value: number;
|
|
10
10
|
max?: number | undefined;
|
|
11
11
|
dimension?: "big" | "small" | "regular" | undefined;
|
|
12
12
|
showProgress?: boolean | undefined;
|
|
13
|
-
} &
|
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useCallback } from 'react';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
4
|
import { CircularProgress as CircularProgressClass } from './circular-progress.module.css';
|
|
4
5
|
export const CircularProgress = forwardRef(({ className, value, max = 100, dimension = 'regular', showProgress, style, ...otherProps }, forwardedRef) => {
|
|
@@ -7,5 +8,6 @@ export const CircularProgress = forwardRef(({ className, value, max = 100, dimen
|
|
|
7
8
|
const dynamicStyle = {
|
|
8
9
|
'--progress': `${getPercentage()}%`
|
|
9
10
|
};
|
|
10
|
-
return (
|
|
11
|
+
return (_jsx("div", { ref: forwardedRef, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, className: clsx(CircularProgressClass, className), "data-circular-progress": clamp(getPercentage(), 0, 100), "data-circular-progress-dimension": dimension, "data-circular-progress-show-progress": showProgress, style: { ...dynamicStyle, ...style }, ...otherProps }, void 0));
|
|
11
12
|
});
|
|
13
|
+
CircularProgress.displayName = 'CircularProgress';
|
|
@@ -1,55 +1 @@
|
|
|
1
|
-
.CircularProgress
|
|
2
|
-
--hue: 220;
|
|
3
|
-
--track-size: 4px;
|
|
4
|
-
--track-bg: var(--dimmed-1);
|
|
5
|
-
|
|
6
|
-
inline-size: env(--space-64);
|
|
7
|
-
min-inline-size: 64px;
|
|
8
|
-
aspect-ratio: 1 / 1;
|
|
9
|
-
display: grid;
|
|
10
|
-
place-items: center;
|
|
11
|
-
position: relative;
|
|
12
|
-
font-weight: 700;
|
|
13
|
-
font-size: 1rem;
|
|
14
|
-
|
|
15
|
-
&[data-circular-progress-show-progress='true']::after {
|
|
16
|
-
content: attr(data-circular-progress);
|
|
17
|
-
display: block;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&[data-circular-progress-dimension='regular'] {
|
|
21
|
-
--track-size: 8px;
|
|
22
|
-
|
|
23
|
-
font-size: 1.77rem;
|
|
24
|
-
inline-size: env(--space-136);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&[data-circular-progress-dimension='big'] {
|
|
28
|
-
--track-size: 16px;
|
|
29
|
-
|
|
30
|
-
font-size: 2.37rem;
|
|
31
|
-
inline-size: env(--space-184);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&::before {
|
|
35
|
-
content: '';
|
|
36
|
-
position: absolute;
|
|
37
|
-
top: 0;
|
|
38
|
-
bottom: 0;
|
|
39
|
-
left: 0;
|
|
40
|
-
right: 0;
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
z-index: -1;
|
|
43
|
-
background:
|
|
44
|
-
conic-gradient(
|
|
45
|
-
var(--cta-default),
|
|
46
|
-
var(--cta-default) var(--progress, 0%),
|
|
47
|
-
var(--track-bg) var(--progress, 0%) 100%
|
|
48
|
-
);
|
|
49
|
-
mask-image:
|
|
50
|
-
radial-gradient(
|
|
51
|
-
transparent calc(71% - var(--track-size)),
|
|
52
|
-
black calc(calc(71% - var(--track-size)) + 0.5px)
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
.CircularProgress{--hue:220;--track-size:4px;--track-bg:var(--dimmed-1);align-items:center;aspect-ratio:1/1;display:grid;font-size:1rem;font-weight:700;inline-size:3.56rem;justify-items:center;min-inline-size:64px;place-items:center;position:relative}.CircularProgress[data-circular-progress-show-progress=true]:after{content:attr(data-circular-progress);display:block}.CircularProgress[data-circular-progress-dimension=regular]{--track-size:8px;font-size:1.77rem;inline-size:7.56rem}.CircularProgress[data-circular-progress-dimension=big]{--track-size:16px;font-size:2.37rem;inline-size:10.22rem}.CircularProgress:before{background:conic-gradient(var(--cta-default),var(--cta-default) var(--progress,0),var(--track-bg) var(--progress,0) 100%);border-radius:50%;bottom:0;content:"";left:0;-webkit-mask-image:radial-gradient(#0000 calc(71% - var(--track-size)),#000 calc(71% - var(--track-size) + .5px));mask-image:radial-gradient(#0000 calc(71% - var(--track-size)),#000 calc(71% - var(--track-size) + .5px));position:absolute;right:0;top:0;z-index:-1}
|
package/clamp-text/clamp-text.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
4
|
import { ClampText as ClampTextClass } from './clamp-text.module.css';
|
|
4
5
|
export const ClampText = forwardRef(({ className, children, rows = 1, style, as: Wrapper = 'span', ...otherProps }, forwardedRef) => {
|
|
5
6
|
const dynamicStyle = {
|
|
6
7
|
'--r': rows
|
|
7
8
|
};
|
|
8
|
-
return (
|
|
9
|
+
return (_jsx(Wrapper, { ref: forwardedRef, style: { ...dynamicStyle, ...style }, className: clsx(ClampTextClass, className), ...otherProps, children: children }, void 0));
|
|
9
10
|
});
|
package/container/container.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { Container as ContainerClass } from './container.module.css';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
export const Container = forwardRef(({ children, className, dimension = 'full', padding = true, as: Wrapper = 'div', ...otherProps }, forwardedRef) => {
|
|
5
|
-
return (
|
|
6
|
+
return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(ContainerClass, className), "data-container-dimension": dimension, "data-container-padding": padding, ...otherProps, children: children }, void 0));
|
|
6
7
|
});
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
.Container {
|
|
4
|
-
padding: 0 env(--space-16);
|
|
5
|
-
margin: 0 auto;
|
|
6
|
-
inline-size: 100%;
|
|
7
|
-
|
|
8
|
-
&[data-container-dimension='medium'] {
|
|
9
|
-
max-inline-size: env(--container-medium);
|
|
10
|
-
|
|
11
|
-
@media (--from-small) {
|
|
12
|
-
padding: 0 env(--space-32);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&[data-container-dimension='large'] {
|
|
17
|
-
max-inline-size: env(--container-large);
|
|
18
|
-
|
|
19
|
-
@media (--from-small) {
|
|
20
|
-
padding: 0 env(--space-32);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&[data-container-dimension='full'] {
|
|
25
|
-
max-inline-size: 100%;
|
|
26
|
-
|
|
27
|
-
@media (--from-small) {
|
|
28
|
-
padding: 0 env(--space-32);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&[data-container-padding='false'] {
|
|
33
|
-
padding: 0;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
.Container{inline-size:100%;margin:0 auto;padding:0 .89rem}.Container[data-container-dimension=medium]{max-inline-size:35.56rem}@media (min-width:48em){.Container[data-container-dimension=medium]{padding:0 1.78rem}}.Container[data-container-dimension=large]{max-inline-size:80rem}@media (min-width:48em){.Container[data-container-dimension=large]{padding:0 1.78rem}}.Container[data-container-dimension=full]{max-inline-size:100%}@media (min-width:48em){.Container[data-container-dimension=full]{padding:0 1.78rem}}.Container[data-container-padding=false]{padding:0}
|
package/core/basic.css
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
html {
|
|
2
|
-
font-size: 112.5%;
|
|
3
|
-
-moz-osx-font-smoothing: grayscale;
|
|
4
|
-
-webkit-font-smoothing: antialiased;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
line-height: 1.5;
|
|
7
|
-
background-color: var(--global-background);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
*,
|
|
11
|
-
*::before,
|
|
12
|
-
*::after {
|
|
13
|
-
margin: 0;
|
|
14
|
-
box-sizing: inherit;
|
|
15
|
-
-webkit-tap-highlight-color: hsl(env(--color-support-brand) / 20%);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
*:focus-visible {
|
|
19
|
-
outline: 5px auto Highlight;
|
|
20
|
-
outline: 5px auto -webkit-focus-ring-color;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
body {
|
|
24
|
-
color: var(--global-foreground);
|
|
25
|
-
font-family: env(--font-family-sans);
|
|
26
|
-
font-feature-settings: 'calt' off;
|
|
27
|
-
scroll-padding: env(--space-80);
|
|
28
|
-
margin: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
::selection {
|
|
32
|
-
background-color: var(--dimmed-7);
|
|
33
|
-
color: var(--dimmed-0);
|
|
34
|
-
text-shadow: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
img {
|
|
38
|
-
display: block;
|
|
39
|
-
inline-size: 100%;
|
|
40
|
-
max-inline-size: 100%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
svg:not([fill]) {
|
|
44
|
-
fill: currentColor;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
fieldset {
|
|
48
|
-
border: 0;
|
|
49
|
-
}
|
|
1
|
+
html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;background-color:var(--global-background);box-sizing:border-box;font-size:112.5%;line-height:1.5}*,:after,:before{-webkit-tap-highlight-color:hsla(0,100%,47%,.2);box-sizing:inherit;margin:0}.focus-visible{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color}:focus-visible{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color}body{font-feature-settings:"calt" off;color:var(--global-foreground);font-family:system-ui,sans-serif;margin:0;scroll-padding:4.44rem}::selection{background-color:var(--dimmed-7);color:var(--dimmed-0);text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg:not([fill]){fill:currentColor}fieldset{border:0}
|