yuyeon 0.3.1-rc.4 → 0.3.1-rc.5
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/LICENSE +191 -191
- package/README.md +15 -15
- package/dist/yuyeon.js +1751 -1687
- package/dist/yuyeon.umd.cjs +3 -3
- package/lib/abstract/items.mjs.map +1 -1
- package/lib/components/alert/YAlert.mjs +2 -2
- package/lib/components/alert/YAlert.mjs.map +1 -1
- package/lib/components/alert/YAlert.scss +77 -77
- package/lib/components/app/YApp.mjs +2 -2
- package/lib/components/app/YApp.mjs.map +1 -1
- package/lib/components/bench/YBench.mjs +2 -2
- package/lib/components/bench/YBench.mjs.map +1 -1
- package/lib/components/button/YButton.scss +137 -137
- package/lib/components/card/YCard.mjs.map +1 -1
- package/lib/components/card/YCard.scss +45 -45
- package/lib/components/card/YCardBody.mjs.map +1 -1
- package/lib/components/card/YCardFooter.mjs.map +1 -1
- package/lib/components/card/YCardHeader.mjs.map +1 -1
- package/lib/components/checkbox/YCheckbox.mjs.map +1 -1
- package/lib/components/checkbox/YInputCheckbox.mjs.map +1 -1
- package/lib/components/checkbox/YInputCheckbox.scss +84 -84
- package/lib/components/checkbox/index.mjs.map +1 -1
- package/lib/components/chip/YChip.scss +36 -36
- package/lib/components/date-picker/YDateCalendar.mjs.map +1 -1
- package/lib/components/date-picker/YDateCalendar.scss +84 -84
- package/lib/components/date-picker/YDatePicker.mjs.map +1 -1
- package/lib/components/date-picker/YDatePickerControl.mjs.map +1 -1
- package/lib/components/date-picker/YMonthPicker.mjs.map +1 -1
- package/lib/components/date-picker/YYearPicker.mjs.map +1 -1
- package/lib/components/dialog/index.mjs.map +1 -1
- package/lib/components/divider/YDivider.mjs.map +1 -1
- package/lib/components/divider/YDivider.scss +2 -2
- package/lib/components/draggable/YDraggable.mjs +2 -2
- package/lib/components/draggable/YDraggable.mjs.map +1 -1
- package/lib/components/dropdown/YDropdown.mjs.map +1 -1
- package/lib/components/dropdown/YDropdown.scss +27 -27
- package/lib/components/field-input/index.mjs.map +1 -1
- package/lib/components/form/YForm.mjs.map +1 -1
- package/lib/components/hover/YHover.mjs +1 -1
- package/lib/components/hover/YHover.mjs.map +1 -1
- package/lib/components/icon/YIcon.mjs.map +1 -1
- package/lib/components/icon/YIcon.scss +18 -18
- package/lib/components/icon/poly.mjs +57 -0
- package/lib/components/icon/poly.mjs.map +1 -0
- package/lib/components/icons/YIconCheckbox.mjs.map +1 -1
- package/lib/components/icons/YIconClear.mjs.map +1 -1
- package/lib/components/icons/YIconDropdown.mjs.map +1 -1
- package/lib/components/icons/YIconExpand.mjs.map +1 -1
- package/lib/components/icons/YIconPageControl.mjs.map +1 -1
- package/lib/components/icons/YIconSort.mjs.map +1 -1
- package/lib/components/icons/YIconSort.scss +24 -24
- package/lib/components/icons/index.mjs.map +1 -1
- package/lib/components/img/YImg.mjs +4 -4
- package/lib/components/img/YImg.mjs.map +1 -1
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/input/YInput.mjs.map +1 -1
- package/lib/components/input/YInput.scss +258 -258
- package/lib/components/ip-field/YIpv4Field.mjs.map +1 -1
- package/lib/components/layer/YLayer.mjs.map +1 -1
- package/lib/components/layer/active-stack.mjs.map +1 -1
- package/lib/components/layer/base.mjs.map +1 -1
- package/lib/components/layer/content.mjs.map +1 -1
- package/lib/components/layer/scroll-strategies.mjs.map +1 -1
- package/lib/components/list/YList.mjs.map +1 -1
- package/lib/components/list/YListItem.mjs.map +1 -1
- package/lib/components/loading/YSpinnerRing.mjs.map +1 -1
- package/lib/components/menu/YMenu.mjs +2 -2
- package/lib/components/menu/YMenu.mjs.map +1 -1
- package/lib/components/menu/YMenu.scss +25 -25
- package/lib/components/navigation/YNavigation.mjs.map +1 -1
- package/lib/components/pagination/YPagination.mjs.map +1 -1
- package/lib/components/pagination/YPagination.scss +52 -52
- package/lib/components/panel/YDividePanel.mjs.map +1 -1
- package/lib/components/plate/YPlate.mjs +2 -2
- package/lib/components/plate/YPlate.mjs.map +1 -1
- package/lib/components/progress-bar/YProgressBar.mjs.map +1 -1
- package/lib/components/progress-bar/YProgressBar.scss +120 -120
- package/lib/components/progress-ring/YProgressRing.mjs +2 -2
- package/lib/components/progress-ring/YProgressRing.mjs.map +1 -1
- package/lib/components/progress-ring/YProgressRing.scss +38 -38
- package/lib/components/progress-ring/index.mjs.map +1 -1
- package/lib/components/select/YSelect.mjs.map +1 -1
- package/lib/components/slider/YSlider.mjs.map +1 -1
- package/lib/components/snackbar/YSnackbar.mjs +5 -5
- package/lib/components/snackbar/YSnackbar.mjs.map +1 -1
- package/lib/components/switch/YSwitch.mjs.map +1 -1
- package/lib/components/switch/YSwitch.scss +211 -211
- package/lib/components/tab/YTab.mjs.map +1 -1
- package/lib/components/tab/YTab.scss +73 -73
- package/lib/components/tab/YTabs.mjs.map +1 -1
- package/lib/components/tab/YTabs.scss +8 -8
- package/lib/components/tab/index.mjs.map +1 -1
- package/lib/components/tab/types.mjs.map +1 -1
- package/lib/components/table/YDataTableBody.mjs.map +1 -1
- package/lib/components/table/YDataTableCell.mjs.map +1 -1
- package/lib/components/table/YDataTableHead.mjs.map +1 -1
- package/lib/components/table/YDataTableLayer.mjs.map +1 -1
- package/lib/components/table/YDataTableRow.mjs.map +1 -1
- package/lib/components/table/YTable.mjs.map +1 -1
- package/lib/components/table/YTable.scss +157 -157
- package/lib/components/table/composibles/header.mjs.map +1 -1
- package/lib/components/table/composibles/items.mjs.map +1 -1
- package/lib/components/table/composibles/options.mjs.map +1 -1
- package/lib/components/table/composibles/pagination.mjs.map +1 -1
- package/lib/components/table/composibles/selection.mjs.map +1 -1
- package/lib/components/table/composibles/sorted-items.mjs.map +1 -1
- package/lib/components/table/composibles/sorting.mjs.map +1 -1
- package/lib/components/table/types/header.mjs.map +1 -1
- package/lib/components/table/types/index.mjs.map +1 -1
- package/lib/components/table/types/row.mjs.map +1 -1
- package/lib/components/text-ellipsis/YTextEllipsis.mjs.map +1 -1
- package/lib/components/text-ellipsis/YTextEllipsis.scss +43 -43
- package/lib/components/text-highlighter/YTextHighlighter.mjs.map +1 -1
- package/lib/components/text-interpolation/YTi.mjs.map +1 -1
- package/lib/components/textarea/YTextarea.mjs.map +1 -1
- package/lib/components/toggle-button/YToggleButton.mjs.map +1 -1
- package/lib/components/tooltip/YTooltip.mjs +2 -2
- package/lib/components/tooltip/YTooltip.mjs.map +1 -1
- package/lib/components/tree-view/YTreeView.scss +81 -81
- package/lib/components/tree-view/types.mjs.map +1 -1
- package/lib/components/tree-view/util.mjs.map +1 -1
- package/lib/composables/choice.mjs.map +1 -1
- package/lib/composables/communication.mjs.map +1 -1
- package/lib/composables/component.mjs.map +1 -1
- package/lib/composables/coordinate/arrangement.mjs.map +1 -1
- package/lib/composables/coordinate/index.mjs.map +1 -1
- package/lib/composables/coordinate/levitation.mjs +2 -2
- package/lib/composables/coordinate/levitation.mjs.map +1 -1
- package/lib/composables/coordinate/types.mjs.map +1 -1
- package/lib/composables/coordinate/utils/point.mjs.map +1 -1
- package/lib/composables/date/factory.mjs.map +1 -1
- package/lib/composables/date/index.mjs.map +1 -1
- package/lib/composables/date/setting.mjs.map +1 -1
- package/lib/composables/date/types.mjs.map +1 -1
- package/lib/composables/defaults/index.mjs.map +1 -1
- package/lib/composables/defaults/share.mjs.map +1 -1
- package/lib/composables/defaults/types.mjs.map +1 -1
- package/lib/composables/dimension.mjs.map +1 -1
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/group.mjs +194 -0
- package/lib/composables/group.mjs.map +1 -0
- package/lib/composables/i18n/index.mjs.map +1 -1
- package/lib/composables/i18n/locale.mjs.map +1 -1
- package/lib/composables/i18n/rtl.mjs.map +1 -1
- package/lib/composables/i18n/share.mjs.map +1 -1
- package/lib/composables/icon.mjs.map +1 -1
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/layer-group.mjs.map +1 -1
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/list-items.mjs.map +1 -1
- package/lib/composables/progress.mjs.map +1 -1
- package/lib/composables/ref.mjs.map +1 -1
- package/lib/composables/resize-observer.mjs.map +1 -1
- package/lib/composables/scope.mjs.map +1 -1
- package/lib/composables/theme/factory.mjs.map +1 -1
- package/lib/composables/theme/index.mjs.map +1 -1
- package/lib/composables/theme/setting.mjs.map +1 -1
- package/lib/composables/theme/types.mjs.map +1 -1
- package/lib/composables/timing.mjs.map +1 -1
- package/lib/composables/transition.mjs.map +1 -1
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/composables/vue-router.mjs.map +1 -1
- package/lib/directives/plate-wave/index.mjs +2 -2
- package/lib/directives/plate-wave/index.mjs.map +1 -1
- package/lib/etc/index.mjs.map +1 -1
- package/lib/i18n/built-in.mjs.map +1 -1
- package/lib/i18n/config.mjs.map +1 -1
- package/lib/i18n/types.mjs.map +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/locales/en.mjs.map +1 -1
- package/lib/locales/index.mjs.map +1 -1
- package/lib/locales/ko.mjs.map +1 -1
- package/lib/styles/_elevation.scss +16 -16
- package/lib/styles/_palette.scss +1 -1
- package/lib/styles/base.scss +130 -130
- package/lib/styles/settings/_elevation.scss +20 -20
- package/lib/styles/settings/_variables.scss +14 -14
- package/lib/styles/theme/dark.scss +11 -11
- package/lib/styles/theme/light.scss +11 -11
- package/lib/styles/util/_mixin.scss +33 -33
- package/lib/styles/util/_var.scss +18 -18
- package/lib/util/anchor.mjs.map +1 -1
- package/lib/util/collection.mjs.map +1 -1
- package/lib/util/color/const.mjs.map +1 -1
- package/lib/util/color/index.mjs +12 -12
- package/lib/util/color/index.mjs.map +1 -1
- package/lib/util/color/types.mjs.map +1 -1
- package/lib/util/color/utils/math-utils.mjs +62 -62
- package/lib/util/color/utils/math-utils.mjs.map +1 -1
- package/lib/util/component/component.mjs.map +1 -1
- package/lib/util/component/index.mjs.map +1 -1
- package/lib/util/component/inject-self.mjs.map +1 -1
- package/lib/util/component/props.mjs.map +1 -1
- package/lib/util/component/types.mjs.map +1 -1
- package/lib/util/date/index.mjs.map +1 -1
- package/lib/util/date/types.mjs.map +1 -1
- package/lib/util/debounce.mjs.map +1 -1
- package/lib/util/environments.mjs.map +1 -1
- package/lib/util/index.mjs.map +1 -1
- package/lib/util/parser.mjs +31 -0
- package/lib/util/parser.mjs.map +1 -0
- package/lib/util/reactivity.mjs +3 -3
- package/lib/util/reactivity.mjs.map +1 -1
- package/lib/util/rect.mjs.map +1 -1
- package/lib/util/validation.mjs.map +1 -1
- package/lib/util/vue-component/index.mjs +63 -0
- package/lib/util/vue-component/index.mjs.map +1 -0
- package/lib/util/vue-component/props.mjs +37 -0
- package/lib/util/vue-component/props.mjs.map +1 -0
- package/lib/util/vue-component/types.mjs +2 -0
- package/lib/util/vue-component/types.mjs.map +1 -0
- package/lib/util/vue-component.mjs +102 -0
- package/lib/util/vue-component.mjs.map +1 -0
- package/package.json +120 -120
- package/types/components/select/YSelect.d.ts +7062 -0
- package/types/components/table/pagination.d.ts +78 -0
- package/types/components/tooltip/YTooltip.d.ts +3711 -0
- package/types/globals.d.ts +20 -20
- package/types/shims.d.ts +55 -55
- package/types/util/color/hct/hct_solver.d.ts +146 -0
- package/types/util/color/hct/viewing_conditions.d.ts +74 -0
- package/types/util/color/palettes/tonal_palette.d.ts +55 -0
- package/types/util/color/utils/math_utils.d.ts +82 -0
- package/types/util/parser.d.ts +4 -0
- package/types/util/vue-component/index.d.ts +10 -0
- package/types/util/vue-component/props.d.ts +31 -0
- package/types/util/vue-component/types.d.ts +4 -0
- package/types/util/vue-component.d.ts +39 -0
- /package/types/util/{rect.d.ts → Rect.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["default","en","ko"],"sources":["../../src/locales/index.ts"],"sourcesContent":["export { default as en } from './en';\nexport { default as ko } from './ko';\n"],"mappings":"SAASA,OAAO,IAAIC,EAAE;AAAA,SACbD,OAAO,IAAIE,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["default","en","ko"],"sources":["../../src/locales/index.ts"],"sourcesContent":["export { default as en } from './en';\r\nexport { default as ko } from './ko';\r\n"],"mappings":"SAASA,OAAO,IAAIC,EAAE;AAAA,SACbD,OAAO,IAAIE,EAAE"}
|
package/lib/locales/ko.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ko.mjs","names":["search","noItems","noData"],"sources":["../../src/locales/ko.ts"],"sourcesContent":["export default {\n search: '검색',\n noItems: '항목이 없습니다.',\n noData: '데이터가 없습니다.'\n};\n"],"mappings":"AAAA,eAAe;EACbA,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,WAAW;EACpBC,MAAM,EAAE;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"ko.mjs","names":["search","noItems","noData"],"sources":["../../src/locales/ko.ts"],"sourcesContent":["export default {\r\n search: '검색',\r\n noItems: '항목이 없습니다.',\r\n noData: '데이터가 없습니다.'\r\n};\r\n"],"mappings":"AAAA,eAAe;EACbA,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,WAAW;EACpBC,MAAM,EAAE;AACV,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use './util/var';
|
|
4
|
-
@use './settings/elevation' as *;
|
|
5
|
-
|
|
6
|
-
@mixin styles() {
|
|
7
|
-
@each $level, $core-dimension in $core-shadow-dimension {
|
|
8
|
-
$ambient-dimension: map.get($ambient-shadow-dimension, $level);
|
|
9
|
-
|
|
10
|
-
.elevation-#{$level} {
|
|
11
|
-
--y-elevation-shadow: #{$core-dimension} rgba(var(--y-elevation-color), #{$core-shadow-opacity}), #{$ambient-dimension} rgba(var(--y-elevation-color), #{$ambient-shadow-opacity});
|
|
12
|
-
|
|
13
|
-
box-shadow: var(--y-elevation-shadow);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use './util/var';
|
|
4
|
+
@use './settings/elevation' as *;
|
|
5
|
+
|
|
6
|
+
@mixin styles() {
|
|
7
|
+
@each $level, $core-dimension in $core-shadow-dimension {
|
|
8
|
+
$ambient-dimension: map.get($ambient-shadow-dimension, $level);
|
|
9
|
+
|
|
10
|
+
.elevation-#{$level} {
|
|
11
|
+
--y-elevation-shadow: #{$core-dimension} rgba(var(--y-elevation-color), #{$core-shadow-opacity}), #{$ambient-dimension} rgba(var(--y-elevation-color), #{$ambient-shadow-opacity});
|
|
12
|
+
|
|
13
|
+
box-shadow: var(--y-elevation-shadow);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/lib/styles/_palette.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
$basic-black: #000;
|
|
1
|
+
$basic-black: #000;
|
package/lib/styles/base.scss
CHANGED
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
@use 'sass:list';
|
|
2
|
-
@use 'settings/provided';
|
|
3
|
-
@use 'settings/variables';
|
|
4
|
-
@use 'palette';
|
|
5
|
-
@use 'elevation';
|
|
6
|
-
|
|
7
|
-
:root {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:root {
|
|
12
|
-
--default-shadow: 0, 0, 0;
|
|
13
|
-
--y-elevation-color: var(--y-theme-shadow, var(--default-shadow));
|
|
14
|
-
|
|
15
|
-
@include elevation.styles();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.y-root {
|
|
19
|
-
background: var(--y-theme-background);
|
|
20
|
-
color: var(--y-theme-on-background);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.fade-enter-active,
|
|
24
|
-
.fade-leave-cative {
|
|
25
|
-
transition: opacity 240ms cubic-bezier(0.2, 0.28, 0.21, 1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.fade-enter-from,
|
|
29
|
-
.fade-leave-to {
|
|
30
|
-
opacity: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.slide-fade-enter-active,
|
|
34
|
-
.slide-fade-leave-active {
|
|
35
|
-
transition: transform 240ms variables.$basic-transition-timing-function,
|
|
36
|
-
opacity 240ms linear;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.slide-fade-enter-from,
|
|
40
|
-
.slide-fade-leave-to {
|
|
41
|
-
transform: translateY(-20px) rotate3d(1, 0, 0, 10deg);
|
|
42
|
-
opacity: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.expand-v-transition {
|
|
46
|
-
&-enter-active {
|
|
47
|
-
transition-duration: 240ms;
|
|
48
|
-
transition-timing-function: variables.$basic-transition-timing-function;
|
|
49
|
-
transition-property: height;
|
|
50
|
-
}
|
|
51
|
-
&-leave-active {
|
|
52
|
-
transition-duration: 240ms;
|
|
53
|
-
transition-timing-function: variables.$basic-transition-timing-function;
|
|
54
|
-
transition-property: height;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.expand-h-transition {
|
|
59
|
-
&-enter-active {
|
|
60
|
-
transition-duration: 240ms;
|
|
61
|
-
transition-timing-function: variables.$basic-transition-timing-function;
|
|
62
|
-
transition-property: width;
|
|
63
|
-
}
|
|
64
|
-
&-leave-active {
|
|
65
|
-
transition-duration: 240ms;
|
|
66
|
-
transition-timing-function: variables.$basic-transition-timing-function;
|
|
67
|
-
transition-property: width;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.title {
|
|
72
|
-
font-size: 20px;
|
|
73
|
-
font-weight: bold;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.contain-paint {
|
|
77
|
-
contain: paint;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
@each $space-type-prefix, $space-type in provided.$space-types {
|
|
81
|
-
@each $side-prefix, $sides-properties in provided.$box-side-combinations {
|
|
82
|
-
@each $space-index, $space-size in variables.$space-list {
|
|
83
|
-
.#{$space-type-prefix}#{$side-prefix}-#{$space-index} {
|
|
84
|
-
@if (list.length($sides-properties) == 0) {
|
|
85
|
-
#{$space-type}: #{$space-size};
|
|
86
|
-
} @else {
|
|
87
|
-
@each $prop in $sides-properties {
|
|
88
|
-
#{$space-type}: {
|
|
89
|
-
#{$prop}: #{$space-size};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@each $align in provided.$text-aligns {
|
|
99
|
-
.text-#{$align} {
|
|
100
|
-
text-align: #{$align};
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
@each $weight in provided.$font-weights {
|
|
105
|
-
.font-weight-#{$weight} {
|
|
106
|
-
font-weight: $weight;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@keyframes rotate {
|
|
111
|
-
to {
|
|
112
|
-
transform: rotate(360deg);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.text-color--error {
|
|
117
|
-
color: var(--y-theme-error);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.d-flex {
|
|
121
|
-
display: flex;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.flex-wrap {
|
|
125
|
-
flex-wrap: wrap;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.flex-spacer {
|
|
129
|
-
flex: 1 1;
|
|
130
|
-
}
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'settings/provided';
|
|
3
|
+
@use 'settings/variables';
|
|
4
|
+
@use 'palette';
|
|
5
|
+
@use 'elevation';
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
--default-shadow: 0, 0, 0;
|
|
13
|
+
--y-elevation-color: var(--y-theme-shadow, var(--default-shadow));
|
|
14
|
+
|
|
15
|
+
@include elevation.styles();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.y-root {
|
|
19
|
+
background: var(--y-theme-background);
|
|
20
|
+
color: var(--y-theme-on-background);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.fade-enter-active,
|
|
24
|
+
.fade-leave-cative {
|
|
25
|
+
transition: opacity 240ms cubic-bezier(0.2, 0.28, 0.21, 1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fade-enter-from,
|
|
29
|
+
.fade-leave-to {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.slide-fade-enter-active,
|
|
34
|
+
.slide-fade-leave-active {
|
|
35
|
+
transition: transform 240ms variables.$basic-transition-timing-function,
|
|
36
|
+
opacity 240ms linear;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.slide-fade-enter-from,
|
|
40
|
+
.slide-fade-leave-to {
|
|
41
|
+
transform: translateY(-20px) rotate3d(1, 0, 0, 10deg);
|
|
42
|
+
opacity: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.expand-v-transition {
|
|
46
|
+
&-enter-active {
|
|
47
|
+
transition-duration: 240ms;
|
|
48
|
+
transition-timing-function: variables.$basic-transition-timing-function;
|
|
49
|
+
transition-property: height;
|
|
50
|
+
}
|
|
51
|
+
&-leave-active {
|
|
52
|
+
transition-duration: 240ms;
|
|
53
|
+
transition-timing-function: variables.$basic-transition-timing-function;
|
|
54
|
+
transition-property: height;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.expand-h-transition {
|
|
59
|
+
&-enter-active {
|
|
60
|
+
transition-duration: 240ms;
|
|
61
|
+
transition-timing-function: variables.$basic-transition-timing-function;
|
|
62
|
+
transition-property: width;
|
|
63
|
+
}
|
|
64
|
+
&-leave-active {
|
|
65
|
+
transition-duration: 240ms;
|
|
66
|
+
transition-timing-function: variables.$basic-transition-timing-function;
|
|
67
|
+
transition-property: width;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.title {
|
|
72
|
+
font-size: 20px;
|
|
73
|
+
font-weight: bold;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.contain-paint {
|
|
77
|
+
contain: paint;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@each $space-type-prefix, $space-type in provided.$space-types {
|
|
81
|
+
@each $side-prefix, $sides-properties in provided.$box-side-combinations {
|
|
82
|
+
@each $space-index, $space-size in variables.$space-list {
|
|
83
|
+
.#{$space-type-prefix}#{$side-prefix}-#{$space-index} {
|
|
84
|
+
@if (list.length($sides-properties) == 0) {
|
|
85
|
+
#{$space-type}: #{$space-size};
|
|
86
|
+
} @else {
|
|
87
|
+
@each $prop in $sides-properties {
|
|
88
|
+
#{$space-type}: {
|
|
89
|
+
#{$prop}: #{$space-size};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@each $align in provided.$text-aligns {
|
|
99
|
+
.text-#{$align} {
|
|
100
|
+
text-align: #{$align};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@each $weight in provided.$font-weights {
|
|
105
|
+
.font-weight-#{$weight} {
|
|
106
|
+
font-weight: $weight;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@keyframes rotate {
|
|
111
|
+
to {
|
|
112
|
+
transform: rotate(360deg);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.text-color--error {
|
|
117
|
+
color: var(--y-theme-error);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.d-flex {
|
|
121
|
+
display: flex;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.flex-wrap {
|
|
125
|
+
flex-wrap: wrap;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.flex-spacer {
|
|
129
|
+
flex: 1 1;
|
|
130
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
$core-shadow-opacity: 0.3;
|
|
2
|
-
$ambient-shadow-opacity: 0.15;
|
|
3
|
-
|
|
4
|
-
$core-shadow-dimension: (
|
|
5
|
-
0: (0px 0px 0px 0px),
|
|
6
|
-
1: (0px 1px 2px 0px),
|
|
7
|
-
2: (0px 1px 2px 0px),
|
|
8
|
-
3: (0px 1px 3px 0px),
|
|
9
|
-
4: (0px 2px 3px 0px),
|
|
10
|
-
5: (0px 4px 4px 0px),
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
$ambient-shadow-dimension: (
|
|
14
|
-
0: (0px 0px 0px 0px),
|
|
15
|
-
1: (0px 1px 3px 1px),
|
|
16
|
-
2: (0px 2px 6px 2px),
|
|
17
|
-
3: (0px 4px 8px 3px),
|
|
18
|
-
4: (0px 6px 10px 4px),
|
|
19
|
-
5: (0px 8px 12px 6px),
|
|
20
|
-
)
|
|
1
|
+
$core-shadow-opacity: 0.3;
|
|
2
|
+
$ambient-shadow-opacity: 0.15;
|
|
3
|
+
|
|
4
|
+
$core-shadow-dimension: (
|
|
5
|
+
0: (0px 0px 0px 0px),
|
|
6
|
+
1: (0px 1px 2px 0px),
|
|
7
|
+
2: (0px 1px 2px 0px),
|
|
8
|
+
3: (0px 1px 3px 0px),
|
|
9
|
+
4: (0px 2px 3px 0px),
|
|
10
|
+
5: (0px 4px 4px 0px),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
$ambient-shadow-dimension: (
|
|
14
|
+
0: (0px 0px 0px 0px),
|
|
15
|
+
1: (0px 1px 3px 1px),
|
|
16
|
+
2: (0px 2px 6px 2px),
|
|
17
|
+
3: (0px 4px 8px 3px),
|
|
18
|
+
4: (0px 6px 10px 4px),
|
|
19
|
+
5: (0px 8px 12px 6px),
|
|
20
|
+
)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
@use "sass:meta";
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
$space-unit: 4px !default;
|
|
5
|
-
$space-max-times: 20 !default;
|
|
6
|
-
|
|
7
|
-
$space-list: () !default;
|
|
8
|
-
@if (meta.type-of($space-list) == list) {
|
|
9
|
-
@for $index from 0 through $space-max-times {
|
|
10
|
-
$space-list: map.merge($space-list, ($index: $space-unit * $index));
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
$basic-transition-timing-function: cubic-bezier(0.23, 0.3, 0.07, 0.97);
|
|
1
|
+
@use "sass:meta";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
$space-unit: 4px !default;
|
|
5
|
+
$space-max-times: 20 !default;
|
|
6
|
+
|
|
7
|
+
$space-list: () !default;
|
|
8
|
+
@if (meta.type-of($space-list) == list) {
|
|
9
|
+
@for $index from 0 through $space-max-times {
|
|
10
|
+
$space-list: map.merge($space-list, ($index: $space-unit * $index));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
$basic-transition-timing-function: cubic-bezier(0.23, 0.3, 0.07, 0.97);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@use '../util/helper';
|
|
4
|
-
|
|
5
|
-
// yui/app theme
|
|
6
|
-
$theme--dark: () !default;
|
|
7
|
-
$theme--dark: map.deep-merge(
|
|
8
|
-
(
|
|
9
|
-
),
|
|
10
|
-
$theme--dark
|
|
11
|
-
);
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use '../util/helper';
|
|
4
|
+
|
|
5
|
+
// yui/app theme
|
|
6
|
+
$theme--dark: () !default;
|
|
7
|
+
$theme--dark: map.deep-merge(
|
|
8
|
+
(
|
|
9
|
+
),
|
|
10
|
+
$theme--dark
|
|
11
|
+
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@use '../util/helper';
|
|
4
|
-
|
|
5
|
-
// yui theme
|
|
6
|
-
$theme--light: () !default;
|
|
7
|
-
$theme--light: map.deep-merge(
|
|
8
|
-
(
|
|
9
|
-
),
|
|
10
|
-
$theme--light
|
|
11
|
-
);
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use '../util/helper';
|
|
4
|
+
|
|
5
|
+
// yui theme
|
|
6
|
+
$theme--light: () !default;
|
|
7
|
+
$theme--light: map.deep-merge(
|
|
8
|
+
(
|
|
9
|
+
),
|
|
10
|
+
$theme--light
|
|
11
|
+
);
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
$border-radius: (
|
|
4
|
-
'top': (
|
|
5
|
-
'top-left',
|
|
6
|
-
'top-right',
|
|
7
|
-
),
|
|
8
|
-
'bottom': (
|
|
9
|
-
'bottom-left',
|
|
10
|
-
'bottom-right',
|
|
11
|
-
),
|
|
12
|
-
'left': (
|
|
13
|
-
'top-left',
|
|
14
|
-
'bottom-left',
|
|
15
|
-
),
|
|
16
|
-
'right': (
|
|
17
|
-
'top-right',
|
|
18
|
-
'bottom-right',
|
|
19
|
-
),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
@mixin borderRadius($round, $side) {
|
|
23
|
-
@if ($side == null) {
|
|
24
|
-
border-radius: $round;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@if (map.has-key($border-radius, $side)) {
|
|
28
|
-
$props: map.get($border-radius, $side);
|
|
29
|
-
@each $prop in $props {
|
|
30
|
-
border-#{$prop}-radius: $round;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$border-radius: (
|
|
4
|
+
'top': (
|
|
5
|
+
'top-left',
|
|
6
|
+
'top-right',
|
|
7
|
+
),
|
|
8
|
+
'bottom': (
|
|
9
|
+
'bottom-left',
|
|
10
|
+
'bottom-right',
|
|
11
|
+
),
|
|
12
|
+
'left': (
|
|
13
|
+
'top-left',
|
|
14
|
+
'bottom-left',
|
|
15
|
+
),
|
|
16
|
+
'right': (
|
|
17
|
+
'top-right',
|
|
18
|
+
'bottom-right',
|
|
19
|
+
),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
@mixin borderRadius($round, $side) {
|
|
23
|
+
@if ($side == null) {
|
|
24
|
+
border-radius: $round;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@if (map.has-key($border-radius, $side)) {
|
|
28
|
+
$props: map.get($border-radius, $side);
|
|
29
|
+
@each $prop in $props {
|
|
30
|
+
border-#{$prop}-radius: $round;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
@use 'sass:string';
|
|
2
|
-
@use './helper';
|
|
3
|
-
|
|
4
|
-
@function create($name, $fallback: null) {
|
|
5
|
-
$name: createName($name);
|
|
6
|
-
@if fallback == null {
|
|
7
|
-
@return var(#{$name});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@return var(#{$name}, $fallback);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@function createName($name) {
|
|
14
|
-
@if helper.hasPrefix($name, '--') {
|
|
15
|
-
@return $name;
|
|
16
|
-
}
|
|
17
|
-
@return string.unquote('--y-#{$name}');
|
|
18
|
-
}
|
|
1
|
+
@use 'sass:string';
|
|
2
|
+
@use './helper';
|
|
3
|
+
|
|
4
|
+
@function create($name, $fallback: null) {
|
|
5
|
+
$name: createName($name);
|
|
6
|
+
@if fallback == null {
|
|
7
|
+
@return var(#{$name});
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@return var(#{$name}, $fallback);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@function createName($name) {
|
|
14
|
+
@if helper.hasPrefix($name, '--') {
|
|
15
|
+
@return $name;
|
|
16
|
+
}
|
|
17
|
+
@return string.unquote('--y-#{$name}');
|
|
18
|
+
}
|
package/lib/util/anchor.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.mjs","names":["includes","array","item","block","inline","parseAnchor","anchor","isRtl","side","align","split","toPhysical","str","flipSide","center","top","bottom","left","right","flipAlign","flipCorner","getAxis"],"sources":["../../src/util/anchor.ts"],"sourcesContent":["const includes = <T, A extends T>(\n array: ReadonlyArray<A>,\n item: T,\n): item is A => array.includes(item as A);\n\nconst block = ['top', 'bottom'] as const;\nconst inline = ['start', 'end', 'left', 'right'] as const;\ntype Tblock = (typeof block)[number];\ntype Tinline = (typeof inline)[number];\nexport type Anchor =\n | Tblock\n | Tinline\n | 'center'\n | 'center center'\n | `${Tblock} ${Tinline | 'center'}`\n | `${Tinline} ${Tblock | 'center'}`;\nexport type ParsedAnchor =\n | { side: 'center'; align: 'center' }\n | { side: Tblock; align: 'left' | 'right' | 'center' }\n | { side: 'left' | 'right'; align: Tblock | 'center' };\n\n/** Parse a raw anchor string into an object */\nexport function parseAnchor(anchor: Anchor, isRtl: boolean) {\n let [side, align] = anchor.split(' ') as [\n Tblock | Tinline | 'center',\n Tblock | Tinline | 'center' | undefined,\n ];\n if (!align) {\n align = includes(block, side)\n ? 'start'\n : includes(inline, side)\n ? 'top'\n : 'center';\n }\n\n return {\n side: toPhysical(side, isRtl),\n align: toPhysical(align, isRtl),\n } as ParsedAnchor;\n}\n\nexport function toPhysical(str: 'center' | Tblock | Tinline, isRtl: boolean) {\n if (str === 'start') return isRtl ? 'right' : 'left';\n if (str === 'end') return isRtl ? 'left' : 'right';\n return str;\n}\n\nexport function flipSide(anchor: ParsedAnchor) {\n return {\n side: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.side],\n align: anchor.align,\n } as ParsedAnchor;\n}\n\nexport function flipAlign(anchor: ParsedAnchor) {\n return {\n side: anchor.side,\n align: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.align],\n } as ParsedAnchor;\n}\n\nexport function flipCorner(anchor: ParsedAnchor) {\n return {\n side: anchor.align,\n align: anchor.side,\n } as ParsedAnchor;\n}\n\nexport function getAxis(anchor: ParsedAnchor) {\n return includes(block, anchor.side) ? 'y' : 'x';\n}\n"],"mappings":"AAAA,MAAMA,QAAQ,GAAGA,CACfC,KAAuB,EACvBC,IAAO,KACOD,KAAK,CAACD,QAAQ,CAACE,IAAS,CAAC;AAEzC,MAAMC,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU;AACxC,MAAMC,MAAM,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAU;AAezD;AACA,OAAO,SAASC,WAAWA,CAACC,MAAc,EAAEC,KAAc,EAAE;EAC1D,IAAI,CAACC,IAAI,EAAEC,KAAK,CAAC,GAAGH,MAAM,CAACI,KAAK,CAAC,GAAG,CAGnC;EACD,IAAI,CAACD,KAAK,EAAE;IACVA,KAAK,GAAGT,QAAQ,CAACG,KAAK,EAAEK,IAAI,CAAC,GACzB,OAAO,GACPR,QAAQ,CAACI,MAAM,EAAEI,IAAI,CAAC,GACpB,KAAK,GACL,QAAQ;EAChB;EAEA,OAAO;IACLA,IAAI,EAAEG,UAAU,CAACH,IAAI,EAAED,KAAK,CAAC;IAC7BE,KAAK,EAAEE,UAAU,CAACF,KAAK,EAAEF,KAAK;EAChC,CAAC;AACH;AAEA,OAAO,SAASI,UAAUA,CAACC,GAAgC,EAAEL,KAAc,EAAE;EAC3E,IAAIK,GAAG,KAAK,OAAO,EAAE,OAAOL,KAAK,GAAG,OAAO,GAAG,MAAM;EACpD,IAAIK,GAAG,KAAK,KAAK,EAAE,OAAOL,KAAK,GAAG,MAAM,GAAG,OAAO;EAClD,OAAOK,GAAG;AACZ;AAEA,OAAO,SAASC,QAAQA,CAACP,MAAoB,EAAE;EAC7C,OAAO;IACLE,IAAI,EAAE;MACJM,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACE,IAAI,CAAC;IACdC,KAAK,EAAEH,MAAM,CAACG;EAChB,CAAC;AACH;AAEA,OAAO,SAASU,SAASA,CAACb,MAAoB,EAAE;EAC9C,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACE,IAAI;IACjBC,KAAK,EAAE;MACLK,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACG,KAAK;EAChB,CAAC;AACH;AAEA,OAAO,SAASW,UAAUA,CAACd,MAAoB,EAAE;EAC/C,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACG,KAAK;IAClBA,KAAK,EAAEH,MAAM,CAACE;EAChB,CAAC;AACH;AAEA,OAAO,SAASa,OAAOA,CAACf,MAAoB,EAAE;EAC5C,OAAON,QAAQ,CAACG,KAAK,EAAEG,MAAM,CAACE,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG;AACjD"}
|
|
1
|
+
{"version":3,"file":"anchor.mjs","names":["includes","array","item","block","inline","parseAnchor","anchor","isRtl","side","align","split","toPhysical","str","flipSide","center","top","bottom","left","right","flipAlign","flipCorner","getAxis"],"sources":["../../src/util/anchor.ts"],"sourcesContent":["const includes = <T, A extends T>(\r\n array: ReadonlyArray<A>,\r\n item: T,\r\n): item is A => array.includes(item as A);\r\n\r\nconst block = ['top', 'bottom'] as const;\r\nconst inline = ['start', 'end', 'left', 'right'] as const;\r\ntype Tblock = (typeof block)[number];\r\ntype Tinline = (typeof inline)[number];\r\nexport type Anchor =\r\n | Tblock\r\n | Tinline\r\n | 'center'\r\n | 'center center'\r\n | `${Tblock} ${Tinline | 'center'}`\r\n | `${Tinline} ${Tblock | 'center'}`;\r\nexport type ParsedAnchor =\r\n | { side: 'center'; align: 'center' }\r\n | { side: Tblock; align: 'left' | 'right' | 'center' }\r\n | { side: 'left' | 'right'; align: Tblock | 'center' };\r\n\r\n/** Parse a raw anchor string into an object */\r\nexport function parseAnchor(anchor: Anchor, isRtl: boolean) {\r\n let [side, align] = anchor.split(' ') as [\r\n Tblock | Tinline | 'center',\r\n Tblock | Tinline | 'center' | undefined,\r\n ];\r\n if (!align) {\r\n align = includes(block, side)\r\n ? 'start'\r\n : includes(inline, side)\r\n ? 'top'\r\n : 'center';\r\n }\r\n\r\n return {\r\n side: toPhysical(side, isRtl),\r\n align: toPhysical(align, isRtl),\r\n } as ParsedAnchor;\r\n}\r\n\r\nexport function toPhysical(str: 'center' | Tblock | Tinline, isRtl: boolean) {\r\n if (str === 'start') return isRtl ? 'right' : 'left';\r\n if (str === 'end') return isRtl ? 'left' : 'right';\r\n return str;\r\n}\r\n\r\nexport function flipSide(anchor: ParsedAnchor) {\r\n return {\r\n side: {\r\n center: 'center',\r\n top: 'bottom',\r\n bottom: 'top',\r\n left: 'right',\r\n right: 'left',\r\n }[anchor.side],\r\n align: anchor.align,\r\n } as ParsedAnchor;\r\n}\r\n\r\nexport function flipAlign(anchor: ParsedAnchor) {\r\n return {\r\n side: anchor.side,\r\n align: {\r\n center: 'center',\r\n top: 'bottom',\r\n bottom: 'top',\r\n left: 'right',\r\n right: 'left',\r\n }[anchor.align],\r\n } as ParsedAnchor;\r\n}\r\n\r\nexport function flipCorner(anchor: ParsedAnchor) {\r\n return {\r\n side: anchor.align,\r\n align: anchor.side,\r\n } as ParsedAnchor;\r\n}\r\n\r\nexport function getAxis(anchor: ParsedAnchor) {\r\n return includes(block, anchor.side) ? 'y' : 'x';\r\n}\r\n"],"mappings":"AAAA,MAAMA,QAAQ,GAAGA,CACfC,KAAuB,EACvBC,IAAO,KACOD,KAAK,CAACD,QAAQ,CAACE,IAAS,CAAC;AAEzC,MAAMC,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU;AACxC,MAAMC,MAAM,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAU;AAezD;AACA,OAAO,SAASC,WAAWA,CAACC,MAAc,EAAEC,KAAc,EAAE;EAC1D,IAAI,CAACC,IAAI,EAAEC,KAAK,CAAC,GAAGH,MAAM,CAACI,KAAK,CAAC,GAAG,CAGnC;EACD,IAAI,CAACD,KAAK,EAAE;IACVA,KAAK,GAAGT,QAAQ,CAACG,KAAK,EAAEK,IAAI,CAAC,GACzB,OAAO,GACPR,QAAQ,CAACI,MAAM,EAAEI,IAAI,CAAC,GACpB,KAAK,GACL,QAAQ;EAChB;EAEA,OAAO;IACLA,IAAI,EAAEG,UAAU,CAACH,IAAI,EAAED,KAAK,CAAC;IAC7BE,KAAK,EAAEE,UAAU,CAACF,KAAK,EAAEF,KAAK;EAChC,CAAC;AACH;AAEA,OAAO,SAASI,UAAUA,CAACC,GAAgC,EAAEL,KAAc,EAAE;EAC3E,IAAIK,GAAG,KAAK,OAAO,EAAE,OAAOL,KAAK,GAAG,OAAO,GAAG,MAAM;EACpD,IAAIK,GAAG,KAAK,KAAK,EAAE,OAAOL,KAAK,GAAG,MAAM,GAAG,OAAO;EAClD,OAAOK,GAAG;AACZ;AAEA,OAAO,SAASC,QAAQA,CAACP,MAAoB,EAAE;EAC7C,OAAO;IACLE,IAAI,EAAE;MACJM,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACE,IAAI,CAAC;IACdC,KAAK,EAAEH,MAAM,CAACG;EAChB,CAAC;AACH;AAEA,OAAO,SAASU,SAASA,CAACb,MAAoB,EAAE;EAC9C,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACE,IAAI;IACjBC,KAAK,EAAE;MACLK,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACG,KAAK;EAChB,CAAC;AACH;AAEA,OAAO,SAASW,UAAUA,CAACd,MAAoB,EAAE;EAC/C,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACG,KAAK;IAClBA,KAAK,EAAEH,MAAM,CAACE;EAChB,CAAC;AACH;AAEA,OAAO,SAASa,OAAOA,CAACf,MAAoB,EAAE;EAC5C,OAAON,QAAQ,CAACG,KAAK,EAAEG,MAAM,CAACE,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG;AACjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.mjs","names":["getFlatChildren","children","childrenKey","arguments","length","undefined","map","child"],"sources":["../../src/util/collection.ts"],"sourcesContent":["export function getFlatChildren(\n children: any[],\n childrenKey = 'children',\n): any[] {\n return children.map((child) => {\n if (child[childrenKey]) {\n return [child, ...getFlatChildren(child[childrenKey])];\n }\n return [child];\n });\n}\n"],"mappings":"AAAA,OAAO,SAASA,eAAeA,CAC7BC,QAAe,EAER;EAAA,IADPC,WAAW,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,UAAU;EAExB,OAAOF,QAAQ,CAACK,GAAG,CAAEC,KAAK,IAAK;IAC7B,IAAIA,KAAK,CAACL,WAAW,CAAC,EAAE;MACtB,OAAO,CAACK,KAAK,EAAE,GAAGP,eAAe,CAACO,KAAK,CAACL,WAAW,CAAC,CAAC,CAAC;IACxD;IACA,OAAO,CAACK,KAAK,CAAC;EAChB,CAAC,CAAC;AACJ"}
|
|
1
|
+
{"version":3,"file":"collection.mjs","names":["getFlatChildren","children","childrenKey","arguments","length","undefined","map","child"],"sources":["../../src/util/collection.ts"],"sourcesContent":["export function getFlatChildren(\r\n children: any[],\r\n childrenKey = 'children',\r\n): any[] {\r\n return children.map((child) => {\r\n if (child[childrenKey]) {\r\n return [child, ...getFlatChildren(child[childrenKey])];\r\n }\r\n return [child];\r\n });\r\n}\r\n"],"mappings":"AAAA,OAAO,SAASA,eAAeA,CAC7BC,QAAe,EAER;EAAA,IADPC,WAAW,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,UAAU;EAExB,OAAOF,QAAQ,CAACK,GAAG,CAAEC,KAAK,IAAK;IAC7B,IAAIA,KAAK,CAACL,WAAW,CAAC,EAAE;MACtB,OAAO,CAACK,KAAK,EAAE,GAAGP,eAAe,CAACO,KAAK,CAACL,WAAW,CAAC,CAAC,CAAC;IACxD;IACA,OAAO,CAACK,KAAK,CAAC;EAChB,CAAC,CAAC;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.mjs","names":["RGBA_REGEX","HEX_COLOR_REGEX","SRGB_TO_XYZ","XYZ_TO_SRGB","WHITE_POINT_D65"],"sources":["../../../src/util/color/const.ts"],"sourcesContent":["export const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\nexport const HEX_COLOR_REGEX = /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/;\n\nexport const SRGB_TO_XYZ = [\n [0.41233895, 0.35762064, 0.18051042],\n [0.2126, 0.7152, 0.0722],\n [0.01932141, 0.11916382, 0.95034478],\n];\n\nexport const XYZ_TO_SRGB = [\n [\n 3.2413774792388685,\n -1.5376652402851851,\n -0.49885366846268053,\n ],\n [\n -0.9691452513005321,\n 1.8758853451067872,\n 0.04156585616912061,\n ],\n [\n 0.05562093689691305,\n -0.20395524564742123,\n 1.0571799111220335,\n ],\n];\n\nexport const WHITE_POINT_D65 = [95.047, 100.0, 108.883];\n"],"mappings":"AAAA,OAAO,MAAMA,UAAU,GAAG,qBAAqB;AAC/C,OAAO,MAAMC,eAAe,GAAG,mDAAmD;AAElF,OAAO,MAAMC,WAAW,GAAG,CACzB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,EACpC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACxB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CACrC;AAED,OAAO,MAAMC,WAAW,GAAG,CACzB,CACE,kBAAkB,EAClB,CAAC,kBAAkB,EACnB,CAAC,mBAAmB,CACrB,EACD,CACE,CAAC,kBAAkB,EACnB,kBAAkB,EAClB,mBAAmB,CACpB,EACD,CACE,mBAAmB,EACnB,CAAC,mBAAmB,EACpB,kBAAkB,CACnB,CACF;AAED,OAAO,MAAMC,eAAe,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"const.mjs","names":["RGBA_REGEX","HEX_COLOR_REGEX","SRGB_TO_XYZ","XYZ_TO_SRGB","WHITE_POINT_D65"],"sources":["../../../src/util/color/const.ts"],"sourcesContent":["export const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\r\nexport const HEX_COLOR_REGEX = /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/;\r\n\r\nexport const SRGB_TO_XYZ = [\r\n [0.41233895, 0.35762064, 0.18051042],\r\n [0.2126, 0.7152, 0.0722],\r\n [0.01932141, 0.11916382, 0.95034478],\r\n];\r\n\r\nexport const XYZ_TO_SRGB = [\r\n [\r\n 3.2413774792388685,\r\n -1.5376652402851851,\r\n -0.49885366846268053,\r\n ],\r\n [\r\n -0.9691452513005321,\r\n 1.8758853451067872,\r\n 0.04156585616912061,\r\n ],\r\n [\r\n 0.05562093689691305,\r\n -0.20395524564742123,\r\n 1.0571799111220335,\r\n ],\r\n];\r\n\r\nexport const WHITE_POINT_D65 = [95.047, 100.0, 108.883];\r\n"],"mappings":"AAAA,OAAO,MAAMA,UAAU,GAAG,qBAAqB;AAC/C,OAAO,MAAMC,eAAe,GAAG,mDAAmD;AAElF,OAAO,MAAMC,WAAW,GAAG,CACzB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,EACpC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACxB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CACrC;AAED,OAAO,MAAMC,WAAW,GAAG,CACzB,CACE,kBAAkB,EAClB,CAAC,kBAAkB,EACnB,CAAC,mBAAmB,CACrB,EACD,CACE,CAAC,kBAAkB,EACnB,kBAAkB,EAClB,mBAAmB,CACpB,EACD,CACE,mBAAmB,EACnB,CAAC,mBAAmB,EACpB,kBAAkB,CACnB,CACF;AAED,OAAO,MAAMC,eAAe,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC"}
|
package/lib/util/color/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* yuyeon
|
|
3
|
-
* Apache-2.0 license (Copyright 2023 yeonyew)
|
|
4
|
-
*
|
|
5
|
-
* Used Libs
|
|
6
|
-
* - material-color-utilities
|
|
7
|
-
* Apache-2.0 license (Copyright 2021 Google LLC)
|
|
8
|
-
* https://github.com/material-foundation/material-color-utilities
|
|
9
|
-
*
|
|
10
|
-
* - Vuetify
|
|
11
|
-
* MIT license (Copyright (c) 2016-2023 John Jeremy Leider)
|
|
12
|
-
* https://github.com/vuetifyjs/vuetify
|
|
1
|
+
/*
|
|
2
|
+
* yuyeon
|
|
3
|
+
* Apache-2.0 license (Copyright 2023 yeonyew)
|
|
4
|
+
*
|
|
5
|
+
* Used Libs
|
|
6
|
+
* - material-color-utilities
|
|
7
|
+
* Apache-2.0 license (Copyright 2021 Google LLC)
|
|
8
|
+
* https://github.com/material-foundation/material-color-utilities
|
|
9
|
+
*
|
|
10
|
+
* - Vuetify
|
|
11
|
+
* MIT license (Copyright (c) 2016-2023 John Jeremy Leider)
|
|
12
|
+
* https://github.com/vuetifyjs/vuetify
|
|
13
13
|
* */
|
|
14
14
|
import { HEX_COLOR_REGEX, RGBA_REGEX } from "./const.mjs";
|
|
15
15
|
import { rgbFromHex } from "./../index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["HEX_COLOR_REGEX","RGBA_REGEX","rgbFromHex","isColorValue","value","test","colorRgb","color","startsWith","join","exec","valueArray","trim","split","splice","isTextColorIsLight","r","g","b","luminance"],"sources":["../../../src/util/color/index.ts"],"sourcesContent":["/*\n* yuyeon\n* Apache-2.0 license (Copyright 2023 yeonyew)\n*\n* Used Libs\n* - material-color-utilities\n* Apache-2.0 license (Copyright 2021 Google LLC)\n* https://github.com/material-foundation/material-color-utilities\n*\n* - Vuetify\n* MIT license (Copyright (c) 2016-2023 John Jeremy Leider)\n* https://github.com/vuetifyjs/vuetify\n* */\n\nimport { HEX_COLOR_REGEX, RGBA_REGEX } from \"./const\";\nimport { rgbFromHex } from '@/util';\n\nexport function isColorValue(value: string): boolean {\n return RGBA_REGEX.test(value) || HEX_COLOR_REGEX.test(value);\n}\n\nexport function colorRgb(color: string): string {\n if (color?.startsWith('#')) {\n return rgbFromHex(color)?.join(',') || '';\n }\n const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\n if (RGBA_REGEX.test(color)) {\n const value = RGBA_REGEX.exec(color)?.[2] || '';\n if (value) {\n const valueArray = value.trim().split(',');\n valueArray.splice(3, 1);\n return valueArray.join(',');\n }\n }\n return '';\n}\n\nexport function isTextColorIsLight(r: number, g: number, b: number): boolean {\n const luminance = 1 - (0.299 * r + 0.587 * g + 0.114 * b) / 255;\n return luminance < 0.5;\n}\n\nexport * from './const';\nexport * from \"./conversion\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA,SAcSA,eAAe,EAAEC,UAAU;AAAA,SAC3BC,UAAU;AAEnB,OAAO,SAASC,YAAYA,CAACC,KAAa,EAAW;EACnD,OAAOH,UAAU,CAACI,IAAI,CAACD,KAAK,CAAC,IAAIJ,eAAe,CAACK,IAAI,CAACD,KAAK,CAAC;AAC9D;AAEA,OAAO,SAASE,QAAQA,CAACC,KAAa,EAAU;EAC9C,IAAIA,KAAK,EAAEC,UAAU,CAAC,GAAG,CAAC,EAAE;IAC1B,OAAON,UAAU,CAACK,KAAK,CAAC,EAAEE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;EAC3C;EACA,MAAMR,UAAU,GAAG,qBAAqB;EACxC,IAAIA,UAAU,CAACI,IAAI,CAACE,KAAK,CAAC,EAAE;IAC1B,MAAMH,KAAK,GAAGH,UAAU,CAACS,IAAI,CAACH,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IAC/C,IAAIH,KAAK,EAAE;MACT,MAAMO,UAAU,GAAGP,KAAK,CAACQ,IAAI,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;MAC1CF,UAAU,CAACG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;MACvB,OAAOH,UAAU,CAACF,IAAI,CAAC,GAAG,CAAC;IAC7B;EACF;EACA,OAAO,EAAE;AACX;AAEA,OAAO,SAASM,kBAAkBA,CAACC,CAAS,EAAEC,CAAS,EAAEC,CAAS,EAAW;EAC3E,MAAMC,SAAS,GAAG,CAAC,GAAG,CAAC,KAAK,GAAGH,CAAC,GAAG,KAAK,GAAGC,CAAC,GAAG,KAAK,GAAGC,CAAC,IAAI,GAAG;EAC/D,OAAOC,SAAS,GAAG,GAAG;AACxB;AAAC;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["HEX_COLOR_REGEX","RGBA_REGEX","rgbFromHex","isColorValue","value","test","colorRgb","color","startsWith","join","exec","valueArray","trim","split","splice","isTextColorIsLight","r","g","b","luminance"],"sources":["../../../src/util/color/index.ts"],"sourcesContent":["/*\r\n* yuyeon\r\n* Apache-2.0 license (Copyright 2023 yeonyew)\r\n*\r\n* Used Libs\r\n* - material-color-utilities\r\n* Apache-2.0 license (Copyright 2021 Google LLC)\r\n* https://github.com/material-foundation/material-color-utilities\r\n*\r\n* - Vuetify\r\n* MIT license (Copyright (c) 2016-2023 John Jeremy Leider)\r\n* https://github.com/vuetifyjs/vuetify\r\n* */\r\n\r\nimport { HEX_COLOR_REGEX, RGBA_REGEX } from \"./const\";\r\nimport { rgbFromHex } from '@/util';\r\n\r\nexport function isColorValue(value: string): boolean {\r\n return RGBA_REGEX.test(value) || HEX_COLOR_REGEX.test(value);\r\n}\r\n\r\nexport function colorRgb(color: string): string {\r\n if (color?.startsWith('#')) {\r\n return rgbFromHex(color)?.join(',') || '';\r\n }\r\n const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\r\n if (RGBA_REGEX.test(color)) {\r\n const value = RGBA_REGEX.exec(color)?.[2] || '';\r\n if (value) {\r\n const valueArray = value.trim().split(',');\r\n valueArray.splice(3, 1);\r\n return valueArray.join(',');\r\n }\r\n }\r\n return '';\r\n}\r\n\r\nexport function isTextColorIsLight(r: number, g: number, b: number): boolean {\r\n const luminance = 1 - (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n return luminance < 0.5;\r\n}\r\n\r\nexport * from './const';\r\nexport * from \"./conversion\";\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA,SAcSA,eAAe,EAAEC,UAAU;AAAA,SAC3BC,UAAU;AAEnB,OAAO,SAASC,YAAYA,CAACC,KAAa,EAAW;EACnD,OAAOH,UAAU,CAACI,IAAI,CAACD,KAAK,CAAC,IAAIJ,eAAe,CAACK,IAAI,CAACD,KAAK,CAAC;AAC9D;AAEA,OAAO,SAASE,QAAQA,CAACC,KAAa,EAAU;EAC9C,IAAIA,KAAK,EAAEC,UAAU,CAAC,GAAG,CAAC,EAAE;IAC1B,OAAON,UAAU,CAACK,KAAK,CAAC,EAAEE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;EAC3C;EACA,MAAMR,UAAU,GAAG,qBAAqB;EACxC,IAAIA,UAAU,CAACI,IAAI,CAACE,KAAK,CAAC,EAAE;IAC1B,MAAMH,KAAK,GAAGH,UAAU,CAACS,IAAI,CAACH,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IAC/C,IAAIH,KAAK,EAAE;MACT,MAAMO,UAAU,GAAGP,KAAK,CAACQ,IAAI,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;MAC1CF,UAAU,CAACG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;MACvB,OAAOH,UAAU,CAACF,IAAI,CAAC,GAAG,CAAC;IAC7B;EACF;EACA,OAAO,EAAE;AACX;AAEA,OAAO,SAASM,kBAAkBA,CAACC,CAAS,EAAEC,CAAS,EAAEC,CAAS,EAAW;EAC3E,MAAMC,SAAS,GAAG,CAAC,GAAG,CAAC,KAAK,GAAGH,CAAC,GAAG,KAAK,GAAGC,CAAC,GAAG,KAAK,GAAGC,CAAC,IAAI,GAAG;EAC/D,OAAOC,SAAS,GAAG,GAAG;AACxB;AAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":["../../../src/util/color/types.ts"],"sourcesContent":["/**\n * RGBA component\n *\n * @param r Red value should be between 0-255\n * @param g Green value should be between 0-255\n * @param b Blue value should be between 0-255\n * @param a Alpha value should be between 0-255\n */\nexport interface Rgba {\n r: number;\n g: number;\n b: number;\n a: number;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.mjs","names":[],"sources":["../../../src/util/color/types.ts"],"sourcesContent":["/**\r\n * RGBA component\r\n *\r\n * @param r Red value should be between 0-255\r\n * @param g Green value should be between 0-255\r\n * @param b Blue value should be between 0-255\r\n * @param a Alpha value should be between 0-255\r\n */\r\nexport interface Rgba {\r\n r: number;\r\n g: number;\r\n b: number;\r\n a: number;\r\n}\r\n"],"mappings":""}
|