musae 0.3.3 → 0.3.6
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.cjs +10 -2
- package/dist/components/avatar/avatar.mjs +10 -2
- package/dist/components/button/button.cjs +11 -10
- package/dist/components/button/button.mjs +7 -6
- package/dist/components/calendar/contribution.cjs +251 -0
- package/dist/components/calendar/contribution.d.ts +13 -0
- package/dist/components/calendar/contribution.mjs +249 -0
- package/dist/components/calendar/index.d.ts +2 -1
- package/dist/components/config/provider.cjs +2 -2
- package/dist/components/config/provider.mjs +2 -2
- package/dist/components/drawer/popup.cjs +51 -17
- package/dist/components/drawer/popup.d.ts +1 -1
- package/dist/components/drawer/popup.mjs +51 -17
- package/dist/components/fab/floatable.d.ts +1 -1
- package/dist/components/icon/icons/action/delete.cjs +20 -0
- package/dist/components/icon/icons/action/delete.d.ts +3 -0
- package/dist/components/icon/icons/action/delete.mjs +18 -0
- package/dist/components/icon/icons/action/index.cjs +7 -1
- package/dist/components/icon/icons/action/index.d.ts +5 -1
- package/dist/components/icon/icons/action/index.mjs +6 -2
- package/dist/components/icon/icons/action/three-d-rotation.cjs +28 -0
- package/dist/components/icon/icons/action/three-d-rotation.d.ts +3 -0
- package/dist/components/icon/icons/action/three-d-rotation.mjs +26 -0
- package/dist/components/icon/icons/editor/attch-file.cjs +20 -0
- package/dist/components/icon/icons/editor/attch-file.d.ts +3 -0
- package/dist/components/icon/icons/editor/attch-file.mjs +18 -0
- package/dist/components/icon/icons/editor/index.cjs +4 -1
- package/dist/components/icon/icons/editor/index.d.ts +3 -1
- package/dist/components/icon/icons/editor/index.mjs +4 -2
- package/dist/components/icon/icons/index.cjs +6 -0
- package/dist/components/icon/icons/index.mjs +3 -0
- package/dist/components/image/image.cjs +49 -2
- package/dist/components/image/image.d.ts +1 -1
- package/dist/components/image/image.mjs +50 -3
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/image/preview/preview.cjs +8 -3
- package/dist/components/image/preview/preview.mjs +8 -3
- package/dist/components/menu/hooks.d.ts +1 -2
- package/dist/components/menu/item.d.ts +2 -3
- package/dist/components/pagination/pagination.cjs +1 -1
- package/dist/components/pagination/pagination.mjs +2 -2
- package/dist/components/popover/popover.cjs +1 -1
- package/dist/components/popover/popover.mjs +1 -1
- package/dist/components/popper/dropdown.cjs +44 -19
- package/dist/components/popper/dropdown.mjs +46 -21
- package/dist/components/popper/hooks.cjs +88 -89
- package/dist/components/popper/hooks.d.ts +7 -13
- package/dist/components/popper/hooks.mjs +91 -91
- package/dist/components/rich-text-editor/plugins/controlled-state/index.cjs +1 -2
- package/dist/components/rich-text-editor/plugins/controlled-state/index.mjs +1 -2
- package/dist/components/rich-text-editor/plugins/markdown-shortcut/index.cjs +5 -4
- package/dist/components/rich-text-editor/plugins/markdown-shortcut/index.d.ts +3 -3
- package/dist/components/rich-text-editor/plugins/markdown-shortcut/index.mjs +3 -4
- package/dist/components/rich-text-editor/rich-text-editor.cjs +5 -5
- package/dist/components/rich-text-editor/rich-text-editor.mjs +3 -3
- package/dist/components/select/utils.cjs +1 -3
- package/dist/components/select/utils.d.ts +1 -1
- package/dist/components/select/utils.mjs +2 -4
- package/dist/components/skeleton/skeleton.cjs +5 -48
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/skeleton/skeleton.mjs +5 -48
- package/dist/components/steps/context.d.ts +1 -1
- package/dist/components/steps/item.d.ts +1 -1
- package/dist/components/steps/steps.d.ts +1 -1
- package/dist/components/switch/switch.cjs +7 -6
- package/dist/components/switch/switch.d.ts +1 -1
- package/dist/components/switch/switch.mjs +8 -7
- package/dist/components/table/body.cjs +3 -1
- package/dist/components/table/body.mjs +3 -1
- package/dist/components/tabs/context.d.ts +1 -1
- package/dist/components/tabs/hooks.d.ts +2 -2
- package/dist/components/tabs/navigation.d.ts +1 -1
- package/dist/components/tabs/panels.d.ts +1 -1
- package/dist/components/tabs/tab.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tag/tag.d.ts +1 -1
- package/dist/components/theme/hooks.cjs +6 -6
- package/dist/components/theme/hooks.d.ts +1 -1
- package/dist/components/theme/hooks.mjs +6 -6
- package/dist/components/theme/theme-provider.cjs +12 -6
- package/dist/components/theme/theme-provider.d.ts +2 -2
- package/dist/components/theme/theme-provider.mjs +12 -6
- package/dist/components/time-picker/hooks.d.ts +1 -1
- package/dist/components/time-picker/panel.d.ts +1 -1
- package/dist/components/time-picker/time-picker.d.ts +1 -1
- package/dist/components/timeline/context.d.ts +1 -1
- package/dist/components/timeline/item.d.ts +1 -1
- package/dist/components/timeline/timeline.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/transfer/context.d.ts +1 -1
- package/dist/components/transfer/hooks.d.ts +1 -1
- package/dist/components/transfer/item.d.ts +1 -1
- package/dist/components/transfer/list.d.ts +1 -1
- package/dist/components/transfer/transfer.d.ts +1 -1
- package/dist/components/upload/upload.cjs +31 -6
- package/dist/components/upload/upload.d.ts +2 -2
- package/dist/components/upload/upload.mjs +31 -6
- package/dist/components/upload/uploadeds.cjs +119 -55
- package/dist/components/upload/uploadeds.d.ts +1 -1
- package/dist/components/upload/uploadeds.mjs +121 -57
- package/dist/components/upload/utils.cjs +9 -0
- package/dist/components/upload/utils.d.ts +6 -0
- package/dist/components/upload/utils.mjs +9 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +1 -1
- package/dist/components/waterfall/sequential.d.ts +1 -1
- package/dist/components/waterfall/waterfall.d.ts +1 -1
- package/dist/components/watermark/hooks.d.ts +1 -1
- package/dist/components/watermark/watermark.d.ts +1 -1
- package/dist/hooks/use-class-names.d.ts +4 -0
- package/dist/hooks/use-closable.cjs +0 -8
- package/dist/hooks/use-closable.mjs +0 -8
- package/dist/hooks/use-container.d.ts +1 -1
- package/dist/hooks/use-lazy-boolean.cjs +2 -2
- package/dist/hooks/use-lazy-boolean.mjs +2 -2
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -0
- package/dist/locale/locales/en_US.cjs +5 -1
- package/dist/locale/locales/en_US.mjs +5 -1
- package/dist/locale/locales/zh_CN.cjs +5 -1
- package/dist/locale/locales/zh_CN.mjs +5 -1
- package/dist/styles.css +16 -7
- package/dist/types/drawer.d.ts +5 -0
- package/dist/types/element.d.ts +1 -56
- package/dist/types/form.d.ts +39 -1
- package/dist/types/image.d.ts +1 -0
- package/dist/types/locale.d.ts +6 -0
- package/dist/types/menu.d.ts +8 -3
- package/dist/types/popper.d.ts +1 -1
- package/dist/types/skeleton.d.ts +0 -7
- package/dist/{components/theme/types.d.ts → types/theme.d.ts} +1 -1
- package/dist/types/tree.d.ts +7 -2
- package/dist/{components/upload/types.d.ts → types/upload.d.ts} +59 -22
- package/dist/{components/waterfall/types.d.ts → types/waterfall.d.ts} +3 -3
- package/dist/utils/class-name.cjs +5 -1
- package/dist/utils/class-name.d.ts +12 -1
- package/dist/utils/class-name.mjs +6 -2
- package/dist/utils/colors.cjs +0 -10
- package/dist/utils/colors.d.ts +1 -4
- package/dist/utils/colors.mjs +1 -10
- package/dist/utils/component-token.cjs +2 -0
- package/dist/utils/component-token.d.ts +3 -1
- package/dist/utils/component-token.mjs +2 -0
- package/dist/utils/date.cjs +13 -0
- package/dist/utils/date.d.ts +6 -0
- package/dist/utils/date.mjs +13 -0
- package/package.json +25 -25
- package/dist/components/icon/icons/three-dimension-rotation.d.ts +0 -3
- /package/dist/{components/steps/types.d.ts → types/steps.d.ts} +0 -0
- /package/dist/{components/switch/types.d.ts → types/switch.d.ts} +0 -0
- /package/dist/{components/tabs/types.d.ts → types/tabs.d.ts} +0 -0
- /package/dist/{components/tag/types.d.ts → types/tag.d.ts} +0 -0
- /package/dist/{components/time-picker/types.d.ts → types/time-picker.d.ts} +0 -0
- /package/dist/{components/timeline/types.d.ts → types/timeline.d.ts} +0 -0
- /package/dist/{components/tooltip/types.d.ts → types/tooltip.d.ts} +0 -0
- /package/dist/{components/transfer/types.d.ts → types/transfer.d.ts} +0 -0
- /package/dist/{components/visually-hidden/types.d.ts → types/visually-hidden.d.ts} +0 -0
- /package/dist/{components/watermark/types.d.ts → types/watermark.d.ts} +0 -0
|
@@ -335,6 +335,10 @@ var I18nButtonClassToken;
|
|
|
335
335
|
(function (I18nButtonClassToken) {
|
|
336
336
|
I18nButtonClassToken[I18nButtonClassToken["I18nButton"] = 0] = "I18nButton";
|
|
337
337
|
})(I18nButtonClassToken || (I18nButtonClassToken = {}));
|
|
338
|
+
var ImageClassToken;
|
|
339
|
+
(function (ImageClassToken) {
|
|
340
|
+
ImageClassToken[ImageClassToken["Image"] = 0] = "Image";
|
|
341
|
+
})(ImageClassToken || (ImageClassToken = {}));
|
|
338
342
|
/**
|
|
339
343
|
* @description
|
|
340
344
|
* class name collection
|
|
@@ -342,7 +346,7 @@ var I18nButtonClassToken;
|
|
|
342
346
|
* if u want change class name, must follow bem css
|
|
343
347
|
* rule like: block__element--modifier
|
|
344
348
|
*/
|
|
345
|
-
var CLASS_NAMES = (_CLASS_NAMES = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Picker, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, PickerClassToken.Picker, "picker"), PickerClassToken.Focused, "picker--focused"), PickerClassToken.Invalid, "picker--invalid"), PickerClassToken.Dropdown, "picker__dropdown")), ComponentToken.Input, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, InputClassToken.Input, "input"), InputClassToken.Wrapper, "input__wrapper"), InputClassToken.Focused, "input__wrapper--focused"), InputClassToken.Invalid, "input__wrapper--invalid")), ComponentToken.Select, _defineProperty({}, SelectClassToken.Select, "select")), ComponentToken.Popper, _defineProperty(_defineProperty({}, PopperClassToken.Dropdown, "dropdown"), PopperClassToken.Arrow, "arrow")), ComponentToken.Form, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FormClassToken.Item, "form__item"), FormClassToken.Field, "form__item-field"), FormClassToken.FieldSupporting, "form__item-supporting"), FormClassToken.FieldError, "form__item-field-error")), ComponentToken.Grid, _defineProperty(_defineProperty({}, GridClassToken.Row, "grid__row"), GridClassToken.Col, "grid__col")), ComponentToken.Radio, _defineProperty({}, RadioClassToken.Radio, "radio")), ComponentToken.Empty, _defineProperty(_defineProperty({}, EmptyClassToken.Empty, "empty"), EmptyClassToken.Description, "empty__description")), ComponentToken.Button, _defineProperty(_defineProperty({}, ButtonClassToken.Button, "button"), ButtonClassToken.Prefix, "button__prefix")), ComponentToken.Drawer, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, DrawerClassToken.Drawer, "drawer"), DrawerClassToken.Overlay, "drawer__overlay"), DrawerClassToken.Panel, "drawer__panel"), DrawerClassToken.Header, "drawer__header"), DrawerClassToken.Body, "drawer__body")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Divider, _defineProperty(_defineProperty({}, DividerClassToken.Divider, "divider"), DividerClassToken.Label, "divider__label")), ComponentToken.Tag, _defineProperty({}, TagClassToken.Tag, "tag")), ComponentToken.Cascader, _defineProperty(_defineProperty({}, CascaderClassToken.Cascader, "cascader"), CascaderClassToken.Options, "cascader__options")), ComponentToken.Dialog, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, DialogClassToken.Dialog, "dialog"), DialogClassToken.Overlay, "dialog__overlay"), DialogClassToken.Panel, "dialog__panel"), DialogClassToken.Header, "dialog__header"), DialogClassToken.Body, "dialog__body"), DialogClassToken.Footer, "dialog__footer")), ComponentToken.Calendar, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, CalendarClassToken.Header, "calendar__header"), CalendarClassToken.Heading, "calendar__heading"), CalendarClassToken.HeadCell, "calendar__head-cell"), CalendarClassToken.DateCell, "calendar__date-cell"), CalendarClassToken.DateCellSelected, "calendar__date-cell--selected"), CalendarClassToken.DateCellInRange, "calendar__date--in-range"), CalendarClassToken.DateCellRangeFrom, "calendar__date--range-from"), CalendarClassToken.DateCellRangeTo, "calendar__date--range-to"), CalendarClassToken.Date, "calendar__date")), ComponentToken.Icon, _defineProperty({}, IconClassToken.Icon, "icon")), ComponentToken.DatePicker, _defineProperty(_defineProperty({}, DatePickerClassToken.Picker, "date-picker"), DatePickerClassToken.Input, "date-picker__input")), ComponentToken.TimePicker, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TimePickerClassToken.Picker, "time-picker"), TimePickerClassToken.Input, "time-picker__input"), TimePickerClassToken.Panel, "time-picker__panel"), TimePickerClassToken.PanelFooter, "time-picker__panel-footer")), ComponentToken.DateRangePicker, _defineProperty(_defineProperty(_defineProperty({}, DateRangePickerClassToken.Picker, "date-range-picker"), DateRangePickerClassToken.Input, "date-range-picker__input"), DateRangePickerClassToken.Separator, "date-range-picker__separator")), ComponentToken.Clock, _defineProperty(_defineProperty({}, ClockClassToken.Clock, "clock"), ClockClassToken.Column, "clock__column")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Menu, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MenuClassToken.Menu, "menu"), MenuClassToken.MenuHorizontal, "menu--horizontal"), MenuClassToken.Group, "menu__group"), MenuClassToken.GroupHidden, "menu__group--hidden"), MenuClassToken.Collapser, "menu__collapser"), MenuClassToken.Item, "menu__item")), ComponentToken.Checkbox, _defineProperty({}, CheckboxClassToken.Checkbox, "checkbox")), ComponentToken.Tree, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TreeClassToken.Tree, "tree"), TreeClassToken.List, "tree__list"), TreeClassToken.ListHidden, "tree__list--hidden"), TreeClassToken.Holder, "tree__holder"), TreeClassToken.Node, "tree__node"), TreeClassToken.Title, "tree__node-title"), TreeClassToken.Expander, "tree__node-expander"), TreeClassToken.Checkbox, "tree__node-checkbox")), ComponentToken.Tabs, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TabsClassToken.Tabs, "tabs"), TabsClassToken.TabsNavigation, "tabs__navigation"), TabsClassToken.TabsNavigator, "tabs__navigator"), TabsClassToken.TabList, "tabs__tab-list"), TabsClassToken.Tab, "tabs__item"), TabsClassToken.Indicator, "tabs__indicator"), TabsClassToken.Panels, "tabs__panels"), TabsClassToken.Panel, "tabs__panel")), ComponentToken.Pagination, _defineProperty(_defineProperty({}, PaginationClassToken.Pagination, "pagination"), PaginationClassToken.SizeSelector, "pagination__size-selector")), ComponentToken.Switch, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, SwitchClassToken.Switch, "switch"), SwitchClassToken.Slider, "switch__slider"), SwitchClassToken.Supporting, "switch__supporting"), SwitchClassToken.Leading, "switch__supporting-leading"), SwitchClassToken.Trailing, "switch__supporting-trailing")), ComponentToken.Rate, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, RateClassToken.Rate, "rate"), RateClassToken.Star, "rate__star"), RateClassToken.Half, "rate__star-half"), RateClassToken.Full, "rate__star-full")), ComponentToken.Tour, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TourClassToken.Tour, "tour"), TourClassToken.Overlay, "rate__overlay"), TourClassToken.Spotlight, "rate__spotlight"), TourClassToken.Title, "rate__title"), TourClassToken.Description, "rate__description"), TourClassToken.Footer, "rate__footer")), ComponentToken.Steps, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, StepsClassToken.Steps, "steps"), StepsClassToken.Item, "steps__item"), StepsClassToken.Done, "steps__item--done"), StepsClassToken.Doing, "steps__item--doing"), StepsClassToken.Todo, "steps__item--todo"), StepsClassToken.Leading, "steps__item-leading"), StepsClassToken.Sign, "steps__item-leading-sign"), StepsClassToken.Title, "steps__item-title"), StepsClassToken.Description, "steps__item-description")), ComponentToken.Timeline, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TimelineClassToken.Timeline, "timeline"), TimelineClassToken.Item, "timeline__item"), TimelineClassToken.Leading, "timeline__item-leading"), TimelineClassToken.Sign, "timeline__item-leading-sign"), TimelineClassToken.Dot, "timeline__item-leading-dot"), TimelineClassToken.Label, "timeline__item-label"), TimelineClassToken.Description, "timeline__item-description")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Breadcrumb, _defineProperty(_defineProperty(_defineProperty({}, BreadcrumbClassToken.Breadcrumb, "breadcrumb"), BreadcrumbClassToken.Item, "breadcrumb__item"), BreadcrumbClassToken.Separator, "breadcrumb__separator")), ComponentToken.Avatar, _defineProperty(_defineProperty({}, AvatarClassToken.Avatar, "avatar"), AvatarClassToken.Group, "avatar__group")), ComponentToken.Notification, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, NotificationClassToken.Notification, "notification"), NotificationClassToken.Title, "notification__title"), NotificationClassToken.Description, "notification__description"), NotificationClassToken.Closer, "notification__closer")), ComponentToken.Progress, _defineProperty(_defineProperty({}, ProgressClassToken.Progress, "progress"), ProgressClassToken.Segment, "progress__segment")), ComponentToken.Tooltip, _defineProperty({}, TooltipClassToken.Tooltip, "tooltip")), ComponentToken.Popover, _defineProperty(_defineProperty(_defineProperty({}, PopoverClassToken.Popover, "popover"), PopoverClassToken.Title, "popover__title"), PopoverClassToken.Content, "popover__content")), ComponentToken.Loading, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, LoadingClassToken.Loading, "loading"), LoadingClassToken.Spin, "loading__spin"), LoadingClassToken.Spinning, "loading__spin-spinning"), LoadingClassToken.Content, "loading__content")), ComponentToken.Collapse, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, CollapseClassToken.Collapse, "collapse"), CollapseClassToken.Item, "collapse__item"), CollapseClassToken.ItemActive, "collapse__item--active"), CollapseClassToken.Header, "collapse__item-header"), CollapseClassToken.Collapser, "collapse__header-collapser"), CollapseClassToken.Panel, "collapse__item-panel"), CollapseClassToken.PanelActive, "collapse__item-panel--active"), CollapseClassToken.Content, "collapse__item-content")), ComponentToken.Waterfall, _defineProperty(_defineProperty({}, WaterfallClassToken.Waterfall, "waterfall"), WaterfallClassToken.Sequential, "waterfall--sequential")), ComponentToken.Transfer, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TransferClassToken.Transfer, "transfer"), TransferClassToken.Operation, "transfer__operation"), TransferClassToken.List, "transfer__list"), TransferClassToken.Title, "transfer__list-title"), TransferClassToken.Item, "transfer__list-item"), TransferClassToken.Header, "transfer__list-header"), TransferClassToken.Body, "transfer__list-body")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Badge, _defineProperty(_defineProperty({}, BadgeClassToken.Badge, "badge"), BadgeClassToken.Tail, "badge__tail")), ComponentToken.Skeleton, _defineProperty(_defineProperty({}, SkeletonClassToken.Skeleton, "skeleton"), SkeletonClassToken.Circular, "skeleton--circular")), ComponentToken.VisuallyHidden, _defineProperty({}, VisuallyHiddenClassToken.VisuallyHidden, "visually-hidden")), ComponentToken.Popconfirm, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, PopconfirmClassToken.Popconfirm, "popconfirm"), PopconfirmClassToken.Title, "popconfirm__title"), PopconfirmClassToken.Description, "popconfirm__description"), PopconfirmClassToken.Footer, "popconfirm__footer")), ComponentToken.Highlight, _defineProperty(_defineProperty({}, HighlightClassToken.Highlight, "highlight"), HighlightClassToken.Capture, "highlight__capture")), ComponentToken.I18nButton, _defineProperty({}, I18nButtonClassToken.I18nButton, "i18n-button")), ComponentToken.Quote, _defineProperty({}, QuoteClassToken.Quote, "quote")), ComponentToken.RichTextEditor, _defineProperty(_defineProperty({}, RichTextEditorClassToken.RichTextEditor, "rich-text-editor"), RichTextEditorClassToken.Loading, "rich-text-editor--loading")));
|
|
349
|
+
var CLASS_NAMES = (_CLASS_NAMES = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Picker, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, PickerClassToken.Picker, "picker"), PickerClassToken.Focused, "picker--focused"), PickerClassToken.Invalid, "picker--invalid"), PickerClassToken.Dropdown, "picker__dropdown")), ComponentToken.Input, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, InputClassToken.Input, "input"), InputClassToken.Wrapper, "input__wrapper"), InputClassToken.Focused, "input__wrapper--focused"), InputClassToken.Invalid, "input__wrapper--invalid")), ComponentToken.Select, _defineProperty({}, SelectClassToken.Select, "select")), ComponentToken.Popper, _defineProperty(_defineProperty({}, PopperClassToken.Dropdown, "dropdown"), PopperClassToken.Arrow, "arrow")), ComponentToken.Form, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FormClassToken.Item, "form__item"), FormClassToken.Field, "form__item-field"), FormClassToken.FieldSupporting, "form__item-supporting"), FormClassToken.FieldError, "form__item-field-error")), ComponentToken.Grid, _defineProperty(_defineProperty({}, GridClassToken.Row, "grid__row"), GridClassToken.Col, "grid__col")), ComponentToken.Radio, _defineProperty({}, RadioClassToken.Radio, "radio")), ComponentToken.Empty, _defineProperty(_defineProperty({}, EmptyClassToken.Empty, "empty"), EmptyClassToken.Description, "empty__description")), ComponentToken.Button, _defineProperty(_defineProperty({}, ButtonClassToken.Button, "button"), ButtonClassToken.Prefix, "button__prefix")), ComponentToken.Drawer, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, DrawerClassToken.Drawer, "drawer"), DrawerClassToken.Overlay, "drawer__overlay"), DrawerClassToken.Panel, "drawer__panel"), DrawerClassToken.Header, "drawer__header"), DrawerClassToken.Body, "drawer__body")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Divider, _defineProperty(_defineProperty({}, DividerClassToken.Divider, "divider"), DividerClassToken.Label, "divider__label")), ComponentToken.Tag, _defineProperty({}, TagClassToken.Tag, "tag")), ComponentToken.Cascader, _defineProperty(_defineProperty({}, CascaderClassToken.Cascader, "cascader"), CascaderClassToken.Options, "cascader__options")), ComponentToken.Dialog, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, DialogClassToken.Dialog, "dialog"), DialogClassToken.Overlay, "dialog__overlay"), DialogClassToken.Panel, "dialog__panel"), DialogClassToken.Header, "dialog__header"), DialogClassToken.Body, "dialog__body"), DialogClassToken.Footer, "dialog__footer")), ComponentToken.Calendar, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, CalendarClassToken.Header, "calendar__header"), CalendarClassToken.Heading, "calendar__heading"), CalendarClassToken.HeadCell, "calendar__head-cell"), CalendarClassToken.DateCell, "calendar__date-cell"), CalendarClassToken.DateCellSelected, "calendar__date-cell--selected"), CalendarClassToken.DateCellInRange, "calendar__date--in-range"), CalendarClassToken.DateCellRangeFrom, "calendar__date--range-from"), CalendarClassToken.DateCellRangeTo, "calendar__date--range-to"), CalendarClassToken.Date, "calendar__date")), ComponentToken.Icon, _defineProperty({}, IconClassToken.Icon, "icon")), ComponentToken.DatePicker, _defineProperty(_defineProperty({}, DatePickerClassToken.Picker, "date-picker"), DatePickerClassToken.Input, "date-picker__input")), ComponentToken.TimePicker, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TimePickerClassToken.Picker, "time-picker"), TimePickerClassToken.Input, "time-picker__input"), TimePickerClassToken.Panel, "time-picker__panel"), TimePickerClassToken.PanelFooter, "time-picker__panel-footer")), ComponentToken.DateRangePicker, _defineProperty(_defineProperty(_defineProperty({}, DateRangePickerClassToken.Picker, "date-range-picker"), DateRangePickerClassToken.Input, "date-range-picker__input"), DateRangePickerClassToken.Separator, "date-range-picker__separator")), ComponentToken.Clock, _defineProperty(_defineProperty({}, ClockClassToken.Clock, "clock"), ClockClassToken.Column, "clock__column")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Menu, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MenuClassToken.Menu, "menu"), MenuClassToken.MenuHorizontal, "menu--horizontal"), MenuClassToken.Group, "menu__group"), MenuClassToken.GroupHidden, "menu__group--hidden"), MenuClassToken.Collapser, "menu__collapser"), MenuClassToken.Item, "menu__item")), ComponentToken.Checkbox, _defineProperty({}, CheckboxClassToken.Checkbox, "checkbox")), ComponentToken.Tree, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TreeClassToken.Tree, "tree"), TreeClassToken.List, "tree__list"), TreeClassToken.ListHidden, "tree__list--hidden"), TreeClassToken.Holder, "tree__holder"), TreeClassToken.Node, "tree__node"), TreeClassToken.Title, "tree__node-title"), TreeClassToken.Expander, "tree__node-expander"), TreeClassToken.Checkbox, "tree__node-checkbox")), ComponentToken.Tabs, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TabsClassToken.Tabs, "tabs"), TabsClassToken.TabsNavigation, "tabs__navigation"), TabsClassToken.TabsNavigator, "tabs__navigator"), TabsClassToken.TabList, "tabs__tab-list"), TabsClassToken.Tab, "tabs__item"), TabsClassToken.Indicator, "tabs__indicator"), TabsClassToken.Panels, "tabs__panels"), TabsClassToken.Panel, "tabs__panel")), ComponentToken.Pagination, _defineProperty(_defineProperty({}, PaginationClassToken.Pagination, "pagination"), PaginationClassToken.SizeSelector, "pagination__size-selector")), ComponentToken.Switch, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, SwitchClassToken.Switch, "switch"), SwitchClassToken.Slider, "switch__slider"), SwitchClassToken.Supporting, "switch__supporting"), SwitchClassToken.Leading, "switch__supporting-leading"), SwitchClassToken.Trailing, "switch__supporting-trailing")), ComponentToken.Rate, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, RateClassToken.Rate, "rate"), RateClassToken.Star, "rate__star"), RateClassToken.Half, "rate__star-half"), RateClassToken.Full, "rate__star-full")), ComponentToken.Tour, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TourClassToken.Tour, "tour"), TourClassToken.Overlay, "rate__overlay"), TourClassToken.Spotlight, "rate__spotlight"), TourClassToken.Title, "rate__title"), TourClassToken.Description, "rate__description"), TourClassToken.Footer, "rate__footer")), ComponentToken.Steps, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, StepsClassToken.Steps, "steps"), StepsClassToken.Item, "steps__item"), StepsClassToken.Done, "steps__item--done"), StepsClassToken.Doing, "steps__item--doing"), StepsClassToken.Todo, "steps__item--todo"), StepsClassToken.Leading, "steps__item-leading"), StepsClassToken.Sign, "steps__item-leading-sign"), StepsClassToken.Title, "steps__item-title"), StepsClassToken.Description, "steps__item-description")), ComponentToken.Timeline, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TimelineClassToken.Timeline, "timeline"), TimelineClassToken.Item, "timeline__item"), TimelineClassToken.Leading, "timeline__item-leading"), TimelineClassToken.Sign, "timeline__item-leading-sign"), TimelineClassToken.Dot, "timeline__item-leading-dot"), TimelineClassToken.Label, "timeline__item-label"), TimelineClassToken.Description, "timeline__item-description")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Breadcrumb, _defineProperty(_defineProperty(_defineProperty({}, BreadcrumbClassToken.Breadcrumb, "breadcrumb"), BreadcrumbClassToken.Item, "breadcrumb__item"), BreadcrumbClassToken.Separator, "breadcrumb__separator")), ComponentToken.Avatar, _defineProperty(_defineProperty({}, AvatarClassToken.Avatar, "avatar"), AvatarClassToken.Group, "avatar__group")), ComponentToken.Notification, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, NotificationClassToken.Notification, "notification"), NotificationClassToken.Title, "notification__title"), NotificationClassToken.Description, "notification__description"), NotificationClassToken.Closer, "notification__closer")), ComponentToken.Progress, _defineProperty(_defineProperty({}, ProgressClassToken.Progress, "progress"), ProgressClassToken.Segment, "progress__segment")), ComponentToken.Tooltip, _defineProperty({}, TooltipClassToken.Tooltip, "tooltip")), ComponentToken.Popover, _defineProperty(_defineProperty(_defineProperty({}, PopoverClassToken.Popover, "popover"), PopoverClassToken.Title, "popover__title"), PopoverClassToken.Content, "popover__content")), ComponentToken.Loading, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, LoadingClassToken.Loading, "loading"), LoadingClassToken.Spin, "loading__spin"), LoadingClassToken.Spinning, "loading__spin-spinning"), LoadingClassToken.Content, "loading__content")), ComponentToken.Collapse, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, CollapseClassToken.Collapse, "collapse"), CollapseClassToken.Item, "collapse__item"), CollapseClassToken.ItemActive, "collapse__item--active"), CollapseClassToken.Header, "collapse__item-header"), CollapseClassToken.Collapser, "collapse__header-collapser"), CollapseClassToken.Panel, "collapse__item-panel"), CollapseClassToken.PanelActive, "collapse__item-panel--active"), CollapseClassToken.Content, "collapse__item-content")), ComponentToken.Waterfall, _defineProperty(_defineProperty({}, WaterfallClassToken.Waterfall, "waterfall"), WaterfallClassToken.Sequential, "waterfall--sequential")), ComponentToken.Transfer, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TransferClassToken.Transfer, "transfer"), TransferClassToken.Operation, "transfer__operation"), TransferClassToken.List, "transfer__list"), TransferClassToken.Title, "transfer__list-title"), TransferClassToken.Item, "transfer__list-item"), TransferClassToken.Header, "transfer__list-header"), TransferClassToken.Body, "transfer__list-body")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CLASS_NAMES, ComponentToken.Badge, _defineProperty(_defineProperty({}, BadgeClassToken.Badge, "badge"), BadgeClassToken.Tail, "badge__tail")), ComponentToken.Skeleton, _defineProperty(_defineProperty({}, SkeletonClassToken.Skeleton, "skeleton"), SkeletonClassToken.Circular, "skeleton--circular")), ComponentToken.VisuallyHidden, _defineProperty({}, VisuallyHiddenClassToken.VisuallyHidden, "visually-hidden")), ComponentToken.Popconfirm, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, PopconfirmClassToken.Popconfirm, "popconfirm"), PopconfirmClassToken.Title, "popconfirm__title"), PopconfirmClassToken.Description, "popconfirm__description"), PopconfirmClassToken.Footer, "popconfirm__footer")), ComponentToken.Highlight, _defineProperty(_defineProperty({}, HighlightClassToken.Highlight, "highlight"), HighlightClassToken.Capture, "highlight__capture")), ComponentToken.I18nButton, _defineProperty({}, I18nButtonClassToken.I18nButton, "i18n-button")), ComponentToken.Quote, _defineProperty({}, QuoteClassToken.Quote, "quote")), ComponentToken.RichTextEditor, _defineProperty(_defineProperty({}, RichTextEditorClassToken.RichTextEditor, "rich-text-editor"), RichTextEditorClassToken.Loading, "rich-text-editor--loading")), ComponentToken.Upload, {}), ComponentToken.Image, _defineProperty({}, ImageClassToken.Image, "image")));
|
|
346
350
|
/**
|
|
347
351
|
* @description
|
|
348
352
|
* add prefix
|
|
@@ -360,4 +364,4 @@ var addPrefix = function addPrefix(classNames, prefix) {
|
|
|
360
364
|
*/
|
|
361
365
|
var DEFAULT_CLASS_NAMES = addPrefix(CLASS_NAMES, Token.Prefix);
|
|
362
366
|
|
|
363
|
-
export { AvatarClassToken, BadgeClassToken, BreadcrumbClassToken, ButtonClassToken, CLASS_NAMES, CalendarClassToken, CascaderClassToken, CheckboxClassToken, ClockClassToken, CollapseClassToken, DEFAULT_CLASS_NAMES, DatePickerClassToken, DateRangePickerClassToken, DialogClassToken, DividerClassToken, DrawerClassToken, EmptyClassToken, FormClassToken, GridClassToken, HighlightClassToken, I18nButtonClassToken, IconClassToken, InputClassToken, LoadingClassToken, MenuClassToken, NotificationClassToken, PaginationClassToken, PickerClassToken, PopconfirmClassToken, PopoverClassToken, PopperClassToken, ProgressClassToken, QuoteClassToken, RadioClassToken, RateClassToken, RichTextEditorClassToken, SelectClassToken, SkeletonClassToken, StepsClassToken, SwitchClassToken, TabsClassToken, TagClassToken, TimePickerClassToken, TimelineClassToken, TooltipClassToken, TourClassToken, TransferClassToken, TreeClassToken, VisuallyHiddenClassToken, WaterfallClassToken, addPrefix, withPrefix };
|
|
367
|
+
export { AvatarClassToken, BadgeClassToken, BreadcrumbClassToken, ButtonClassToken, CLASS_NAMES, CalendarClassToken, CascaderClassToken, CheckboxClassToken, ClockClassToken, CollapseClassToken, DEFAULT_CLASS_NAMES, DatePickerClassToken, DateRangePickerClassToken, DialogClassToken, DividerClassToken, DrawerClassToken, EmptyClassToken, FormClassToken, GridClassToken, HighlightClassToken, I18nButtonClassToken, IconClassToken, ImageClassToken, InputClassToken, LoadingClassToken, MenuClassToken, NotificationClassToken, PaginationClassToken, PickerClassToken, PopconfirmClassToken, PopoverClassToken, PopperClassToken, ProgressClassToken, QuoteClassToken, RadioClassToken, RateClassToken, RichTextEditorClassToken, SelectClassToken, SkeletonClassToken, StepsClassToken, SwitchClassToken, TabsClassToken, TagClassToken, TimePickerClassToken, TimelineClassToken, TooltipClassToken, TourClassToken, TransferClassToken, TreeClassToken, VisuallyHiddenClassToken, WaterfallClassToken, addPrefix, withPrefix };
|
package/dist/utils/colors.cjs
CHANGED
|
@@ -68,15 +68,5 @@ var toColors = function toColors(palette, mode) {
|
|
|
68
68
|
var isLight = mode === "light";
|
|
69
69
|
return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, exports.ColorToken.Primary, isLight ? palette.primary[40] : palette.primary[80]), exports.ColorToken.OnPrimary, isLight ? palette.primary[100] : palette.primary[20]), exports.ColorToken.PrimaryContainer, isLight ? palette.primary[90] : palette.primary[30]), exports.ColorToken.OnPrimaryContainer, isLight ? palette.primary[10] : palette.primary[90]), exports.ColorToken.PrimaryFixed, palette.primary[90]), exports.ColorToken.PrimaryFixedDim, palette.primary[80]), exports.ColorToken.OnPrimaryFixed, palette.primary[10]), exports.ColorToken.OnPrimaryFixedVariant, palette.primary[30]), exports.ColorToken.Secondary, isLight ? palette.secondary[40] : palette.secondary[80]), exports.ColorToken.OnSecondary, isLight ? palette.secondary[100] : palette.secondary[20]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, exports.ColorToken.SecondaryContainer, isLight ? palette.secondary[90] : palette.secondary[30]), exports.ColorToken.OnSecondaryContainer, isLight ? palette.secondary[10] : palette.secondary[90]), exports.ColorToken.SecondaryFixed, palette.secondary[90]), exports.ColorToken.SecondaryFixedDim, palette.secondary[80]), exports.ColorToken.OnSecondaryFixed, palette.secondary[10]), exports.ColorToken.OnSecondaryFixedVariant, palette.secondary[30]), exports.ColorToken.Tertiary, isLight ? palette.tertiary[40] : palette.tertiary[80]), exports.ColorToken.OnTertiary, isLight ? palette.tertiary[100] : palette.tertiary[20]), exports.ColorToken.TertiaryContainer, isLight ? palette.tertiary[90] : palette.tertiary[30]), exports.ColorToken.OnTertiaryContainer, isLight ? palette.tertiary[10] : palette.tertiary[90]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, exports.ColorToken.TertiaryFixed, palette.tertiary[90]), exports.ColorToken.TertiaryFixedDim, palette.tertiary[80]), exports.ColorToken.OnTertiaryFixed, palette.tertiary[10]), exports.ColorToken.OnTertiaryFixedVariant, palette.tertiary[30]), exports.ColorToken.Error, isLight ? palette.error[40] : palette.error[80]), exports.ColorToken.OnError, isLight ? palette.error[100] : palette.error[20]), exports.ColorToken.ErrorContainer, isLight ? palette.error[90] : palette.error[30]), exports.ColorToken.OnErrorContainer, isLight ? palette.error[10] : palette.error[90]), exports.ColorToken.Surface, isLight ? palette.neutral[99] : palette.neutral[10]), exports.ColorToken.SurfaceVariant, isLight ? palette.neutralVariant[90] : palette.neutralVariant[30]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, exports.ColorToken.SurfaceDim, isLight ? palette.neutral[90] : palette.neutral[10]), exports.ColorToken.SurfaceContainerLowest, isLight ? palette.neutral[100] : palette.neutral[0]), exports.ColorToken.SurfaceContainerLow, isLight ? palette.neutral[95] : palette.neutral[10]), exports.ColorToken.SurfaceContainer, isLight ? palette.neutral[95] : palette.neutral[10]), exports.ColorToken.SurfaceContainerHigh, isLight ? palette.neutral[95] : palette.neutral[10]), exports.ColorToken.SurfaceContainerHighest, isLight ? palette.neutral[90] : palette.neutral[20]), exports.ColorToken.OnSurface, isLight ? palette.neutral[10] : palette.neutral[90]), exports.ColorToken.OnSurfaceVariant, isLight ? palette.neutralVariant[30] : palette.neutralVariant[80]), exports.ColorToken.InverseSurface, isLight ? palette.neutral[20] : palette.neutral[90]), exports.ColorToken.InverseOnSurface, isLight ? palette.neutral[95] : palette.neutral[20]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, exports.ColorToken.InversePrimary, isLight ? palette.primary[80] : palette.primary[40]), exports.ColorToken.Outline, isLight ? palette.neutralVariant[50] : palette.neutralVariant[60]), exports.ColorToken.OutlineVariant, isLight ? palette.neutralVariant[80] : palette.neutralVariant[30]), exports.ColorToken.Shadow, palette.neutral[0]), exports.ColorToken.Scrim, palette.neutral[0]), exports.ColorToken.Success, isLight ? palette.success[100] : palette.success[0]), exports.ColorToken.Warning, isLight ? palette.warning[100] : palette.warning[0]);
|
|
70
70
|
};
|
|
71
|
-
// TODO: add to relax
|
|
72
|
-
var toRgba = function toRgba(color) {
|
|
73
|
-
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
74
|
-
var hex = color.slice(1);
|
|
75
|
-
var r = parseInt(hex.slice(0, 2), 16);
|
|
76
|
-
var g = parseInt(hex.slice(2, 4), 16);
|
|
77
|
-
var b = parseInt(hex.slice(4, 6), 16);
|
|
78
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
79
|
-
};
|
|
80
71
|
|
|
81
72
|
exports.toColors = toColors;
|
|
82
|
-
exports.toRgba = toRgba;
|
package/dist/utils/colors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ContextValue, Palette } from "../
|
|
1
|
+
import type { ContextValue, Palette } from "../types/theme";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* theme token
|
|
@@ -62,6 +62,3 @@ export declare enum ColorToken {
|
|
|
62
62
|
* here, musae provide some easy usage
|
|
63
63
|
*/
|
|
64
64
|
export declare const toColors: (palette: Palette, mode: ContextValue["mode"]) => Record<ColorToken, string>;
|
|
65
|
-
export declare const isHexColor: (color: string) => boolean;
|
|
66
|
-
export declare const toHexColor: (color: string) => string;
|
|
67
|
-
export declare const toRgba: (color: string, alpha?: number) => string;
|
package/dist/utils/colors.mjs
CHANGED
|
@@ -68,14 +68,5 @@ var toColors = function toColors(palette, mode) {
|
|
|
68
68
|
var isLight = mode === "light";
|
|
69
69
|
return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, ColorToken.Primary, isLight ? palette.primary[40] : palette.primary[80]), ColorToken.OnPrimary, isLight ? palette.primary[100] : palette.primary[20]), ColorToken.PrimaryContainer, isLight ? palette.primary[90] : palette.primary[30]), ColorToken.OnPrimaryContainer, isLight ? palette.primary[10] : palette.primary[90]), ColorToken.PrimaryFixed, palette.primary[90]), ColorToken.PrimaryFixedDim, palette.primary[80]), ColorToken.OnPrimaryFixed, palette.primary[10]), ColorToken.OnPrimaryFixedVariant, palette.primary[30]), ColorToken.Secondary, isLight ? palette.secondary[40] : palette.secondary[80]), ColorToken.OnSecondary, isLight ? palette.secondary[100] : palette.secondary[20]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, ColorToken.SecondaryContainer, isLight ? palette.secondary[90] : palette.secondary[30]), ColorToken.OnSecondaryContainer, isLight ? palette.secondary[10] : palette.secondary[90]), ColorToken.SecondaryFixed, palette.secondary[90]), ColorToken.SecondaryFixedDim, palette.secondary[80]), ColorToken.OnSecondaryFixed, palette.secondary[10]), ColorToken.OnSecondaryFixedVariant, palette.secondary[30]), ColorToken.Tertiary, isLight ? palette.tertiary[40] : palette.tertiary[80]), ColorToken.OnTertiary, isLight ? palette.tertiary[100] : palette.tertiary[20]), ColorToken.TertiaryContainer, isLight ? palette.tertiary[90] : palette.tertiary[30]), ColorToken.OnTertiaryContainer, isLight ? palette.tertiary[10] : palette.tertiary[90]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, ColorToken.TertiaryFixed, palette.tertiary[90]), ColorToken.TertiaryFixedDim, palette.tertiary[80]), ColorToken.OnTertiaryFixed, palette.tertiary[10]), ColorToken.OnTertiaryFixedVariant, palette.tertiary[30]), ColorToken.Error, isLight ? palette.error[40] : palette.error[80]), ColorToken.OnError, isLight ? palette.error[100] : palette.error[20]), ColorToken.ErrorContainer, isLight ? palette.error[90] : palette.error[30]), ColorToken.OnErrorContainer, isLight ? palette.error[10] : palette.error[90]), ColorToken.Surface, isLight ? palette.neutral[99] : palette.neutral[10]), ColorToken.SurfaceVariant, isLight ? palette.neutralVariant[90] : palette.neutralVariant[30]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, ColorToken.SurfaceDim, isLight ? palette.neutral[90] : palette.neutral[10]), ColorToken.SurfaceContainerLowest, isLight ? palette.neutral[100] : palette.neutral[0]), ColorToken.SurfaceContainerLow, isLight ? palette.neutral[95] : palette.neutral[10]), ColorToken.SurfaceContainer, isLight ? palette.neutral[95] : palette.neutral[10]), ColorToken.SurfaceContainerHigh, isLight ? palette.neutral[95] : palette.neutral[10]), ColorToken.SurfaceContainerHighest, isLight ? palette.neutral[90] : palette.neutral[20]), ColorToken.OnSurface, isLight ? palette.neutral[10] : palette.neutral[90]), ColorToken.OnSurfaceVariant, isLight ? palette.neutralVariant[30] : palette.neutralVariant[80]), ColorToken.InverseSurface, isLight ? palette.neutral[20] : palette.neutral[90]), ColorToken.InverseOnSurface, isLight ? palette.neutral[95] : palette.neutral[20]), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, ColorToken.InversePrimary, isLight ? palette.primary[80] : palette.primary[40]), ColorToken.Outline, isLight ? palette.neutralVariant[50] : palette.neutralVariant[60]), ColorToken.OutlineVariant, isLight ? palette.neutralVariant[80] : palette.neutralVariant[30]), ColorToken.Shadow, palette.neutral[0]), ColorToken.Scrim, palette.neutral[0]), ColorToken.Success, isLight ? palette.success[100] : palette.success[0]), ColorToken.Warning, isLight ? palette.warning[100] : palette.warning[0]);
|
|
70
70
|
};
|
|
71
|
-
// TODO: add to relax
|
|
72
|
-
var toRgba = function toRgba(color) {
|
|
73
|
-
var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
74
|
-
var hex = color.slice(1);
|
|
75
|
-
var r = parseInt(hex.slice(0, 2), 16);
|
|
76
|
-
var g = parseInt(hex.slice(2, 4), 16);
|
|
77
|
-
var b = parseInt(hex.slice(4, 6), 16);
|
|
78
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
79
|
-
};
|
|
80
71
|
|
|
81
|
-
export { ColorToken, toColors
|
|
72
|
+
export { ColorToken, toColors };
|
|
@@ -52,4 +52,6 @@ exports.ComponentToken = void 0;
|
|
|
52
52
|
ComponentToken[ComponentToken["I18nButton"] = 45] = "I18nButton";
|
|
53
53
|
ComponentToken[ComponentToken["Quote"] = 46] = "Quote";
|
|
54
54
|
ComponentToken[ComponentToken["RichTextEditor"] = 47] = "RichTextEditor";
|
|
55
|
+
ComponentToken[ComponentToken["Upload"] = 48] = "Upload";
|
|
56
|
+
ComponentToken[ComponentToken["Image"] = 49] = "Image";
|
|
55
57
|
})(exports.ComponentToken || (exports.ComponentToken = {}));
|
|
@@ -52,6 +52,8 @@ var ComponentToken;
|
|
|
52
52
|
ComponentToken[ComponentToken["I18nButton"] = 45] = "I18nButton";
|
|
53
53
|
ComponentToken[ComponentToken["Quote"] = 46] = "Quote";
|
|
54
54
|
ComponentToken[ComponentToken["RichTextEditor"] = 47] = "RichTextEditor";
|
|
55
|
+
ComponentToken[ComponentToken["Upload"] = 48] = "Upload";
|
|
56
|
+
ComponentToken[ComponentToken["Image"] = 49] = "Image";
|
|
55
57
|
})(ComponentToken || (ComponentToken = {}));
|
|
56
58
|
|
|
57
59
|
export { ComponentToken };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* get first sunday of the month
|
|
4
|
+
*/
|
|
5
|
+
var firstSundayInMonth = function firstSundayInMonth(date) {
|
|
6
|
+
var _from = date.startOf("month");
|
|
7
|
+
if (_from.day() === 0) {
|
|
8
|
+
return _from;
|
|
9
|
+
}
|
|
10
|
+
return _from.startOf("week").add(1, "week");
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
exports.firstSundayInMonth = firstSundayInMonth;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* get first sunday of the month
|
|
4
|
+
*/
|
|
5
|
+
var firstSundayInMonth = function firstSundayInMonth(date) {
|
|
6
|
+
var _from = date.startOf("month");
|
|
7
|
+
if (_from.day() === 0) {
|
|
8
|
+
return _from;
|
|
9
|
+
}
|
|
10
|
+
return _from.startOf("week").add(1, "week");
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { firstSundayInMonth };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "musae",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "musae-ui",
|
|
5
5
|
"author": "tutu@fantufantu.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,38 +53,38 @@
|
|
|
53
53
|
"pnpm": ">=9"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@aiszlab/
|
|
57
|
-
"@
|
|
56
|
+
"@aiszlab/fuzzy": "^1.4.4",
|
|
57
|
+
"@aiszlab/relax": "^1.4.4",
|
|
58
|
+
"@babel/runtime": "^7.25.7",
|
|
58
59
|
"@dnd-kit/core": "^6.1.0",
|
|
59
60
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
60
61
|
"@floating-ui/dom": "^1.6.11",
|
|
61
|
-
"@lexical/code": "^0.
|
|
62
|
-
"@lexical/link": "^0.
|
|
63
|
-
"@lexical/list": "^0.
|
|
64
|
-
"@lexical/markdown": "^0.
|
|
65
|
-
"@lexical/react": "^0.
|
|
66
|
-
"@lexical/rich-text": "^0.
|
|
67
|
-
"@lexical/selection": "^0.
|
|
68
|
-
"@lexical/utils": "^0.
|
|
62
|
+
"@lexical/code": "^0.18.0",
|
|
63
|
+
"@lexical/link": "^0.18.0",
|
|
64
|
+
"@lexical/list": "^0.18.0",
|
|
65
|
+
"@lexical/markdown": "^0.18.0",
|
|
66
|
+
"@lexical/react": "^0.18.0",
|
|
67
|
+
"@lexical/rich-text": "^0.18.0",
|
|
68
|
+
"@lexical/selection": "^0.18.0",
|
|
69
|
+
"@lexical/utils": "^0.18.0",
|
|
69
70
|
"@tanstack/react-table": "^8.20.5",
|
|
70
71
|
"dayjs": "^1.11.13",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"lexical": "^0.17.1",
|
|
72
|
+
"framer-motion": "^11.11.1",
|
|
73
|
+
"lexical": "^0.18.0",
|
|
74
74
|
"react-hook-form": "^7.53.0",
|
|
75
75
|
"rxjs": "^7.8.1"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@aiszlab/jarvis": "^1.0.2",
|
|
79
|
-
"@babel/core": "^7.25.
|
|
80
|
-
"@babel/plugin-transform-runtime": "^7.25.
|
|
81
|
-
"@babel/preset-env": "^7.25.
|
|
82
|
-
"@babel/preset-react": "^7.
|
|
83
|
-
"@babel/preset-typescript": "^7.
|
|
79
|
+
"@babel/core": "^7.25.7",
|
|
80
|
+
"@babel/plugin-transform-runtime": "^7.25.7",
|
|
81
|
+
"@babel/preset-env": "^7.25.7",
|
|
82
|
+
"@babel/preset-react": "^7.25.7",
|
|
83
|
+
"@babel/preset-typescript": "^7.25.7",
|
|
84
84
|
"@rollup/plugin-babel": "^6.0.4",
|
|
85
|
-
"@rollup/plugin-commonjs": "^26.0.
|
|
86
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
87
|
-
"@rollup/plugin-typescript": "^
|
|
85
|
+
"@rollup/plugin-commonjs": "^26.0.3",
|
|
86
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
87
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
88
88
|
"@stylexjs/babel-plugin": "^0.7.5",
|
|
89
89
|
"@stylexjs/rollup-plugin": "^0.7.5",
|
|
90
90
|
"@stylexjs/stylex": "^0.7.5",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"@testing-library/user-event": "^14.5.2",
|
|
94
94
|
"@types/dom-view-transitions": "^1.0.5",
|
|
95
95
|
"@types/jest": "^29.5.13",
|
|
96
|
-
"@types/node": "^22.
|
|
97
|
-
"@types/react": "^18.3.
|
|
96
|
+
"@types/node": "^22.7.4",
|
|
97
|
+
"@types/react": "^18.3.11",
|
|
98
98
|
"@types/react-dom": "^18.3.0",
|
|
99
99
|
"babel-jest": "^29.7.0",
|
|
100
100
|
"babel-preset-react-app": "^10.0.1",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"jest-environment-jsdom": "^29.7.0",
|
|
105
105
|
"react": "^18.3.1",
|
|
106
106
|
"react-dom": "^18.3.1",
|
|
107
|
-
"rollup": "^4.
|
|
107
|
+
"rollup": "^4.24.0",
|
|
108
108
|
"typescript": "^5.6.2",
|
|
109
109
|
"zx": "^8.1.8"
|
|
110
110
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|