nuance-ui 0.2.2 → 0.2.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.md +9 -9
- package/README.md +75 -75
- package/dist/module.json +1 -1
- package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
- package/dist/runtime/components/action-icon/action-icon.vue +22 -22
- package/dist/runtime/components/alert.vue +128 -128
- package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
- package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
- package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
- package/dist/runtime/components/app-shell/app-shell.vue +34 -34
- package/dist/runtime/components/avatar/avatar-group.vue +3 -3
- package/dist/runtime/components/avatar/avatar.vue +14 -14
- package/dist/runtime/components/background-image.vue +18 -18
- package/dist/runtime/components/badge.vue +159 -160
- package/dist/runtime/components/box.vue +3 -3
- package/dist/runtime/components/breadcrumbs.vue +78 -78
- package/dist/runtime/components/button/button-group.vue +3 -3
- package/dist/runtime/components/button/button.vue +37 -37
- package/dist/runtime/components/button/unstyled-button.vue +23 -23
- package/dist/runtime/components/calendar/calendar.vue +60 -60
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
- package/dist/runtime/components/card/card-section.vue +3 -3
- package/dist/runtime/components/card/card.vue +3 -3
- package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
- package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
- package/dist/runtime/components/checkbox/checkbox.vue +140 -140
- package/dist/runtime/components/chip/chip-group.vue +2 -2
- package/dist/runtime/components/chip/chip.vue +200 -200
- package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
- package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
- package/dist/runtime/components/combobox/combobox-group.vue +21 -21
- package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
- package/dist/runtime/components/combobox/combobox-option.vue +26 -26
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
- package/dist/runtime/components/combobox/combobox-root.vue +3 -3
- package/dist/runtime/components/combobox/combobox-target.vue +3 -3
- package/dist/runtime/components/container.vue +8 -8
- package/dist/runtime/components/date-time-picker.vue +65 -65
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
- package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
- package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
- package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
- package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
- package/dist/runtime/components/drawer/drawer-header.vue +3 -3
- package/dist/runtime/components/drawer/drawer-root.vue +15 -15
- package/dist/runtime/components/drawer/drawer-title.vue +3 -3
- package/dist/runtime/components/files/file-upload-button.vue +12 -12
- package/dist/runtime/components/files/file-upload-icon.vue +1 -1
- package/dist/runtime/components/input/date-picker.vue +85 -85
- package/dist/runtime/components/input/email-input.vue +21 -21
- package/dist/runtime/components/input/number-input.vue +132 -132
- package/dist/runtime/components/input/password-input.vue +28 -28
- package/dist/runtime/components/input/text-input.vue +33 -33
- package/dist/runtime/components/input/ui/button-input.vue +64 -64
- package/dist/runtime/components/input/ui/input-base.vue +283 -283
- package/dist/runtime/components/input/ui/input-inline.vue +105 -105
- package/dist/runtime/components/input/ui/input-label.vue +4 -4
- package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
- package/dist/runtime/components/input/ui/spin-input.vue +69 -69
- package/dist/runtime/components/link/link-button.vue +16 -16
- package/dist/runtime/components/link/link.vue +10 -10
- package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
- package/dist/runtime/components/loader/loader.vue +1 -1
- package/dist/runtime/components/modal/modal-close-button.vue +3 -3
- package/dist/runtime/components/modal/modal-header.vue +3 -3
- package/dist/runtime/components/modal/modal-root.vue +13 -13
- package/dist/runtime/components/modal/modal-title.vue +3 -3
- package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
- package/dist/runtime/components/nav-link/nav-link.vue +130 -130
- package/dist/runtime/components/paper.vue +33 -33
- package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
- package/dist/runtime/components/popover/popover-target.vue +8 -8
- package/dist/runtime/components/popover/popover.vue +1 -1
- package/dist/runtime/components/progress/progress-label.vue +3 -3
- package/dist/runtime/components/progress/progress-root.vue +3 -3
- package/dist/runtime/components/progress/progress-section.vue +8 -8
- package/dist/runtime/components/progress/progress.vue +9 -9
- package/dist/runtime/components/renderless/renderless.vue +3 -3
- package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
- package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
- package/dist/runtime/components/select/select.vue +59 -59
- package/dist/runtime/components/table/table.d.ts +30 -30
- package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
- package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
- package/dist/runtime/components/table/ui/table.vue +295 -295
- package/dist/runtime/components/tabs/tabs-list.vue +10 -10
- package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
- package/dist/runtime/components/tabs/tabs-root.vue +8 -8
- package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
- package/dist/runtime/components/text.vue +67 -67
- package/dist/runtime/components/textarea.vue +34 -34
- package/dist/runtime/components/time-picker/time-picker.vue +230 -230
- package/dist/runtime/components/title.vue +14 -14
- package/dist/runtime/components/transition/transition.vue +3 -3
- package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
- package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
- package/dist/runtime/components/tree/tree.vue +20 -20
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
- package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
- package/dist/runtime/modals/modals-provider.vue +10 -10
- package/dist/runtime/styles/dark-theme.css +1 -1
- package/package.json +9 -48
|
@@ -13,122 +13,122 @@ const style = computed(() => ({
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
16
|
-
<UnstyledButton v-bind='props' :style :class='$style.cell'>
|
|
17
|
-
<slot />
|
|
18
|
-
</UnstyledButton>
|
|
16
|
+
<UnstyledButton v-bind='props' :style :class='$style.cell'>
|
|
17
|
+
<slot />
|
|
18
|
+
</UnstyledButton>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<style lang="postcss" module>
|
|
22
|
-
.cell {
|
|
23
|
-
--day-size-xs: rem(30px);
|
|
24
|
-
--day-size-sm: rem(36px);
|
|
25
|
-
--day-size-md: rem(42px);
|
|
26
|
-
--day-size-lg: rem(48px);
|
|
27
|
-
--day-size-xl: rem(54px);
|
|
28
|
-
--day-size: var(--day-size-sm);
|
|
29
|
-
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
user-select: none;
|
|
32
|
-
|
|
33
|
-
display: inline-flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
|
|
37
|
-
width: var(--day-size, var(--day-size-sm));
|
|
38
|
-
height: var(--day-size, var(--day-size-sm));
|
|
39
|
-
border-radius: var(--radius-default);
|
|
40
|
-
|
|
41
|
-
font-size: calc(var(--day-size) / 2.8);
|
|
42
|
-
color: var(--color-text);
|
|
43
|
-
|
|
44
|
-
background-color: transparent;
|
|
45
|
-
|
|
46
|
-
&:hover {
|
|
47
|
-
&:where(:not([data-static], &:disabled, [data-selected], [data-in-range])) {
|
|
48
|
-
@mixin light {
|
|
49
|
-
background-color: var(--color-gray-0);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@mixin dark {
|
|
53
|
-
background-color: var(--color-dark-5);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&:where([data-static]) {
|
|
59
|
-
cursor: default;
|
|
60
|
-
user-select: auto;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&:where([data-weekend]) {
|
|
64
|
-
color: var(--color-red-6);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:where([data-outside]) {
|
|
68
|
-
/* stylelint-disable-next-line function-no-unknown */
|
|
69
|
-
color: alpha(var(--color-dimmed), .5);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&:where([data-hidden]) {
|
|
73
|
-
display: none;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&:where([data-today]:not([data-selected], [data-in-range])) {
|
|
77
|
-
@mixin where-light {
|
|
78
|
-
border: 1px solid var(--color-gray-4);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@mixin where-dark {
|
|
82
|
-
border: 1px solid var(--color-dark-4);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&:where([data-in-range]) {
|
|
87
|
-
border-radius: 0;
|
|
88
|
-
|
|
89
|
-
background-color: var(--color-primary-light-hover);
|
|
90
|
-
|
|
91
|
-
&:hover {
|
|
92
|
-
&:where(:not(:disabled, [data-static])) {
|
|
93
|
-
background-color: var(--color-primary-light);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&:where([data-first-in-range]) {
|
|
99
|
-
border-radius: 0;
|
|
100
|
-
border-start-start-radius: var(--radius-default);
|
|
101
|
-
border-end-start-radius: var(--radius-default);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:where([data-last-in-range]) {
|
|
105
|
-
border-radius: 0;
|
|
106
|
-
border-start-end-radius: var(--radius-default);
|
|
107
|
-
border-end-end-radius: var(--radius-default);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&:where([data-last-in-range][data-first-in-range]) {
|
|
111
|
-
border-radius: var(--radius-default);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&:where([data-selected]) {
|
|
115
|
-
color: var(--color-white);
|
|
116
|
-
|
|
117
|
-
background-color: var(--color-primary-filled);
|
|
118
|
-
|
|
119
|
-
&:hover {
|
|
120
|
-
&:where(:not(:disabled, [data-static])) {
|
|
121
|
-
background-color: var(--color-primary-filled-hover);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&:where(:disabled) {
|
|
127
|
-
pointer-events: none;
|
|
128
|
-
cursor: not-allowed;
|
|
129
|
-
|
|
130
|
-
/* stylelint-disable-next-line function-no-unknown */
|
|
131
|
-
color: alpha(var(--color-disabled), .5);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
22
|
+
.cell {
|
|
23
|
+
--day-size-xs: rem(30px);
|
|
24
|
+
--day-size-sm: rem(36px);
|
|
25
|
+
--day-size-md: rem(42px);
|
|
26
|
+
--day-size-lg: rem(48px);
|
|
27
|
+
--day-size-xl: rem(54px);
|
|
28
|
+
--day-size: var(--day-size-sm);
|
|
29
|
+
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
|
|
37
|
+
width: var(--day-size, var(--day-size-sm));
|
|
38
|
+
height: var(--day-size, var(--day-size-sm));
|
|
39
|
+
border-radius: var(--radius-default);
|
|
40
|
+
|
|
41
|
+
font-size: calc(var(--day-size) / 2.8);
|
|
42
|
+
color: var(--color-text);
|
|
43
|
+
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
&:where(:not([data-static], &:disabled, [data-selected], [data-in-range])) {
|
|
48
|
+
@mixin light {
|
|
49
|
+
background-color: var(--color-gray-0);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@mixin dark {
|
|
53
|
+
background-color: var(--color-dark-5);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:where([data-static]) {
|
|
59
|
+
cursor: default;
|
|
60
|
+
user-select: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:where([data-weekend]) {
|
|
64
|
+
color: var(--color-red-6);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:where([data-outside]) {
|
|
68
|
+
/* stylelint-disable-next-line function-no-unknown */
|
|
69
|
+
color: alpha(var(--color-dimmed), .5);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:where([data-hidden]) {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:where([data-today]:not([data-selected], [data-in-range])) {
|
|
77
|
+
@mixin where-light {
|
|
78
|
+
border: 1px solid var(--color-gray-4);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@mixin where-dark {
|
|
82
|
+
border: 1px solid var(--color-dark-4);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:where([data-in-range]) {
|
|
87
|
+
border-radius: 0;
|
|
88
|
+
|
|
89
|
+
background-color: var(--color-primary-light-hover);
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
&:where(:not(:disabled, [data-static])) {
|
|
93
|
+
background-color: var(--color-primary-light);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:where([data-first-in-range]) {
|
|
99
|
+
border-radius: 0;
|
|
100
|
+
border-start-start-radius: var(--radius-default);
|
|
101
|
+
border-end-start-radius: var(--radius-default);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:where([data-last-in-range]) {
|
|
105
|
+
border-radius: 0;
|
|
106
|
+
border-start-end-radius: var(--radius-default);
|
|
107
|
+
border-end-end-radius: var(--radius-default);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:where([data-last-in-range][data-first-in-range]) {
|
|
111
|
+
border-radius: var(--radius-default);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:where([data-selected]) {
|
|
115
|
+
color: var(--color-white);
|
|
116
|
+
|
|
117
|
+
background-color: var(--color-primary-filled);
|
|
118
|
+
|
|
119
|
+
&:hover {
|
|
120
|
+
&:where(:not(:disabled, [data-static])) {
|
|
121
|
+
background-color: var(--color-primary-filled-hover);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:where(:disabled) {
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
|
|
130
|
+
/* stylelint-disable-next-line function-no-unknown */
|
|
131
|
+
color: alpha(var(--color-disabled), .5);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
134
|
</style>
|
|
@@ -26,102 +26,102 @@ defineEmits(["prev", "level", "next"]);
|
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
29
|
-
<Box :is v-bind='props' :class='$style.header'>
|
|
30
|
-
<UnstyledButton
|
|
31
|
-
v-if='withPrev'
|
|
32
|
-
aria-label='Previous page'
|
|
33
|
-
:disabled='prevDisabled?.()'
|
|
34
|
-
:class='$style.control'
|
|
35
|
-
@click='$emit("prev")'
|
|
36
|
-
>
|
|
37
|
-
<Icon :name='prevIcon' :class='$style.icon' />
|
|
38
|
-
</UnstyledButton>
|
|
39
|
-
|
|
40
|
-
<UnstyledButton
|
|
41
|
-
:disabled
|
|
42
|
-
:class='$style.level'
|
|
43
|
-
@click='$emit("level")'
|
|
44
|
-
>
|
|
45
|
-
<slot />
|
|
46
|
-
</UnstyledButton>
|
|
47
|
-
|
|
48
|
-
<UnstyledButton
|
|
49
|
-
v-if='withNext'
|
|
50
|
-
aria-label='Next page'
|
|
51
|
-
:disabled='nextDisabled?.()'
|
|
52
|
-
:class='$style.control'
|
|
53
|
-
@click='$emit("next")'
|
|
54
|
-
>
|
|
55
|
-
<Icon :name='nextIcon' :class='$style.icon' />
|
|
56
|
-
</UnstyledButton>
|
|
57
|
-
</Box>
|
|
29
|
+
<Box :is v-bind='props' :class='$style.header'>
|
|
30
|
+
<UnstyledButton
|
|
31
|
+
v-if='withPrev'
|
|
32
|
+
aria-label='Previous page'
|
|
33
|
+
:disabled='prevDisabled?.()'
|
|
34
|
+
:class='$style.control'
|
|
35
|
+
@click='$emit("prev")'
|
|
36
|
+
>
|
|
37
|
+
<Icon :name='prevIcon' :class='$style.icon' />
|
|
38
|
+
</UnstyledButton>
|
|
39
|
+
|
|
40
|
+
<UnstyledButton
|
|
41
|
+
:disabled
|
|
42
|
+
:class='$style.level'
|
|
43
|
+
@click='$emit("level")'
|
|
44
|
+
>
|
|
45
|
+
<slot />
|
|
46
|
+
</UnstyledButton>
|
|
47
|
+
|
|
48
|
+
<UnstyledButton
|
|
49
|
+
v-if='withNext'
|
|
50
|
+
aria-label='Next page'
|
|
51
|
+
:disabled='nextDisabled?.()'
|
|
52
|
+
:class='$style.control'
|
|
53
|
+
@click='$emit("next")'
|
|
54
|
+
>
|
|
55
|
+
<Icon :name='nextIcon' :class='$style.icon' />
|
|
56
|
+
</UnstyledButton>
|
|
57
|
+
</Box>
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<style lang="postcss" module>
|
|
61
|
-
.header {
|
|
62
|
-
--dch-control-size-xs: rem(30px);
|
|
63
|
-
--dch-control-size-sm: rem(36px);
|
|
64
|
-
--dch-control-size-md: rem(42px);
|
|
65
|
-
--dch-control-size-lg: rem(48px);
|
|
66
|
-
--dch-control-size-xl: rem(54px);
|
|
67
|
-
--dch-control-size: var(--dch-control-size-sm);
|
|
68
|
-
|
|
69
|
-
--dch-control-radius: var(--radius-default);
|
|
70
|
-
|
|
71
|
-
display: flex;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.level,
|
|
75
|
-
.control {
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
user-select: none;
|
|
78
|
-
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
|
|
83
|
-
height: var(--dch-control-size);
|
|
84
|
-
border-radius: var(--dch-control-radius);
|
|
85
|
-
|
|
86
|
-
opacity: 1;
|
|
87
|
-
|
|
88
|
-
&:where([data-static]) {
|
|
89
|
-
cursor: default;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&:hover {
|
|
93
|
-
&:where(:not([data-static], :disabled)) {
|
|
94
|
-
@mixin light {
|
|
95
|
-
background-color: var(--color-gray-0);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@mixin dark {
|
|
99
|
-
background-color: var(--color-dark-5);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:where(:disabled) {
|
|
105
|
-
cursor: not-allowed;
|
|
106
|
-
|
|
107
|
-
opacity: 0.2;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.level {
|
|
112
|
-
flex: 1;
|
|
113
|
-
|
|
114
|
-
font-size: var(--dch-fz, var(--font-size-sm));
|
|
115
|
-
font-weight: 500;
|
|
116
|
-
text-transform: capitalize;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.control {
|
|
120
|
-
width: var(--dch-control-size);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.icon {
|
|
124
|
-
width: 60%;
|
|
125
|
-
height: 60%;
|
|
126
|
-
}
|
|
61
|
+
.header {
|
|
62
|
+
--dch-control-size-xs: rem(30px);
|
|
63
|
+
--dch-control-size-sm: rem(36px);
|
|
64
|
+
--dch-control-size-md: rem(42px);
|
|
65
|
+
--dch-control-size-lg: rem(48px);
|
|
66
|
+
--dch-control-size-xl: rem(54px);
|
|
67
|
+
--dch-control-size: var(--dch-control-size-sm);
|
|
68
|
+
|
|
69
|
+
--dch-control-radius: var(--radius-default);
|
|
70
|
+
|
|
71
|
+
display: flex;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.level,
|
|
75
|
+
.control {
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
user-select: none;
|
|
78
|
+
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
|
|
83
|
+
height: var(--dch-control-size);
|
|
84
|
+
border-radius: var(--dch-control-radius);
|
|
85
|
+
|
|
86
|
+
opacity: 1;
|
|
87
|
+
|
|
88
|
+
&:where([data-static]) {
|
|
89
|
+
cursor: default;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:hover {
|
|
93
|
+
&:where(:not([data-static], :disabled)) {
|
|
94
|
+
@mixin light {
|
|
95
|
+
background-color: var(--color-gray-0);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@mixin dark {
|
|
99
|
+
background-color: var(--color-dark-5);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:where(:disabled) {
|
|
105
|
+
cursor: not-allowed;
|
|
106
|
+
|
|
107
|
+
opacity: 0.2;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.level {
|
|
112
|
+
flex: 1;
|
|
113
|
+
|
|
114
|
+
font-size: var(--dch-fz, var(--font-size-sm));
|
|
115
|
+
font-weight: 500;
|
|
116
|
+
text-transform: capitalize;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.control {
|
|
120
|
+
width: var(--dch-control-size);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.icon {
|
|
124
|
+
width: 60%;
|
|
125
|
+
height: 60%;
|
|
126
|
+
}
|
|
127
127
|
</style>
|
|
@@ -53,53 +53,53 @@ function handleSelect(year) {
|
|
|
53
53
|
</script>
|
|
54
54
|
|
|
55
55
|
<template>
|
|
56
|
-
<Box is='table' role='grid' tabindex='-1' :class='$style.table'>
|
|
57
|
-
<tbody>
|
|
58
|
-
<tr v-for='(years, yearsIx) in yearList' :key='`decade-${yearsIx}`'>
|
|
59
|
-
<td v-for='year in years' :key='year'>
|
|
60
|
-
<CalendarCell
|
|
61
|
-
:class='$style.year'
|
|
56
|
+
<Box is='table' role='grid' tabindex='-1' :class='$style.table'>
|
|
57
|
+
<tbody>
|
|
58
|
+
<tr v-for='(years, yearsIx) in yearList' :key='`decade-${yearsIx}`'>
|
|
59
|
+
<td v-for='year in years' :key='year'>
|
|
60
|
+
<CalendarCell
|
|
61
|
+
:class='$style.year'
|
|
62
62
|
:mod='{
|
|
63
63
|
"today": isToday(year),
|
|
64
64
|
"selected": isSelected(year),
|
|
65
65
|
"in-range": isInRange(year),
|
|
66
66
|
"first-in-range": isFirstInRange(year),
|
|
67
67
|
"last-in-range": isLastInRange(year)
|
|
68
|
-
}'
|
|
69
|
-
:disabled='isDisabled(year)'
|
|
70
|
-
:size
|
|
71
|
-
@click='handleSelect(year)'
|
|
72
|
-
>
|
|
73
|
-
{{ year }}
|
|
74
|
-
</CalendarCell>
|
|
75
|
-
</td>
|
|
76
|
-
</tr>
|
|
77
|
-
</tbody>
|
|
78
|
-
</Box>
|
|
68
|
+
}'
|
|
69
|
+
:disabled='isDisabled(year)'
|
|
70
|
+
:size
|
|
71
|
+
@click='handleSelect(year)'
|
|
72
|
+
>
|
|
73
|
+
{{ year }}
|
|
74
|
+
</CalendarCell>
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
</tbody>
|
|
78
|
+
</Box>
|
|
79
79
|
</template>
|
|
80
80
|
|
|
81
81
|
<style lang="postcss" module>
|
|
82
|
-
.table {
|
|
83
|
-
table-layout: fixed;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.year {
|
|
87
|
-
--day-size-xs: 1.875rem;
|
|
88
|
-
--day-size-sm: 2.25rem;
|
|
89
|
-
--day-size-md: 2.625rem;
|
|
90
|
-
--day-size-lg: 3rem;
|
|
91
|
-
--day-size-xl: 3.375rem;
|
|
92
|
-
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
|
|
99
|
-
width: calc((var(--day-size) * 7) / 3 + .09375rem);
|
|
100
|
-
|
|
101
|
-
height: var(--day-size);
|
|
102
|
-
|
|
103
|
-
text-transform: capitalize;
|
|
104
|
-
}
|
|
82
|
+
.table {
|
|
83
|
+
table-layout: fixed;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.year {
|
|
87
|
+
--day-size-xs: 1.875rem;
|
|
88
|
+
--day-size-sm: 2.25rem;
|
|
89
|
+
--day-size-md: 2.625rem;
|
|
90
|
+
--day-size-lg: 3rem;
|
|
91
|
+
--day-size-xl: 3.375rem;
|
|
92
|
+
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
|
|
99
|
+
width: calc((var(--day-size) * 7) / 3 + .09375rem);
|
|
100
|
+
|
|
101
|
+
height: var(--day-size);
|
|
102
|
+
|
|
103
|
+
text-transform: capitalize;
|
|
104
|
+
}
|
|
105
105
|
</style>
|