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.
Files changed (113) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +75 -75
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
  5. package/dist/runtime/components/action-icon/action-icon.vue +22 -22
  6. package/dist/runtime/components/alert.vue +128 -128
  7. package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
  8. package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
  9. package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
  10. package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
  11. package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
  12. package/dist/runtime/components/app-shell/app-shell.vue +34 -34
  13. package/dist/runtime/components/avatar/avatar-group.vue +3 -3
  14. package/dist/runtime/components/avatar/avatar.vue +14 -14
  15. package/dist/runtime/components/background-image.vue +18 -18
  16. package/dist/runtime/components/badge.vue +159 -160
  17. package/dist/runtime/components/box.vue +3 -3
  18. package/dist/runtime/components/breadcrumbs.vue +78 -78
  19. package/dist/runtime/components/button/button-group.vue +3 -3
  20. package/dist/runtime/components/button/button.vue +37 -37
  21. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  22. package/dist/runtime/components/calendar/calendar.vue +60 -60
  23. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
  24. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  25. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  26. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
  27. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  28. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
  29. package/dist/runtime/components/card/card-section.vue +3 -3
  30. package/dist/runtime/components/card/card.vue +3 -3
  31. package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
  32. package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
  33. package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
  34. package/dist/runtime/components/checkbox/checkbox.vue +140 -140
  35. package/dist/runtime/components/chip/chip-group.vue +2 -2
  36. package/dist/runtime/components/chip/chip.vue +200 -200
  37. package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
  38. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  39. package/dist/runtime/components/combobox/combobox-group.vue +21 -21
  40. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  41. package/dist/runtime/components/combobox/combobox-option.vue +26 -26
  42. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
  43. package/dist/runtime/components/combobox/combobox-root.vue +3 -3
  44. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  45. package/dist/runtime/components/container.vue +8 -8
  46. package/dist/runtime/components/date-time-picker.vue +65 -65
  47. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  48. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  49. package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
  50. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  51. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  52. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  53. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  54. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  55. package/dist/runtime/components/files/file-upload-button.vue +12 -12
  56. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  57. package/dist/runtime/components/input/date-picker.vue +85 -85
  58. package/dist/runtime/components/input/email-input.vue +21 -21
  59. package/dist/runtime/components/input/number-input.vue +132 -132
  60. package/dist/runtime/components/input/password-input.vue +28 -28
  61. package/dist/runtime/components/input/text-input.vue +33 -33
  62. package/dist/runtime/components/input/ui/button-input.vue +64 -64
  63. package/dist/runtime/components/input/ui/input-base.vue +283 -283
  64. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  65. package/dist/runtime/components/input/ui/input-label.vue +4 -4
  66. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  67. package/dist/runtime/components/input/ui/spin-input.vue +69 -69
  68. package/dist/runtime/components/link/link-button.vue +16 -16
  69. package/dist/runtime/components/link/link.vue +10 -10
  70. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  71. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  72. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  73. package/dist/runtime/components/loader/loader.vue +1 -1
  74. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  75. package/dist/runtime/components/modal/modal-header.vue +3 -3
  76. package/dist/runtime/components/modal/modal-root.vue +13 -13
  77. package/dist/runtime/components/modal/modal-title.vue +3 -3
  78. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  79. package/dist/runtime/components/nav-link/nav-link.vue +130 -130
  80. package/dist/runtime/components/paper.vue +33 -33
  81. package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
  82. package/dist/runtime/components/popover/popover-target.vue +8 -8
  83. package/dist/runtime/components/popover/popover.vue +1 -1
  84. package/dist/runtime/components/progress/progress-label.vue +3 -3
  85. package/dist/runtime/components/progress/progress-root.vue +3 -3
  86. package/dist/runtime/components/progress/progress-section.vue +8 -8
  87. package/dist/runtime/components/progress/progress.vue +9 -9
  88. package/dist/runtime/components/renderless/renderless.vue +3 -3
  89. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  90. package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
  91. package/dist/runtime/components/select/select.vue +59 -59
  92. package/dist/runtime/components/table/table.d.ts +30 -30
  93. package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
  94. package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
  95. package/dist/runtime/components/table/ui/table.vue +295 -295
  96. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  97. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  98. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  99. package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
  100. package/dist/runtime/components/text.vue +67 -67
  101. package/dist/runtime/components/textarea.vue +34 -34
  102. package/dist/runtime/components/time-picker/time-picker.vue +230 -230
  103. package/dist/runtime/components/title.vue +14 -14
  104. package/dist/runtime/components/transition/transition.vue +3 -3
  105. package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
  106. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  107. package/dist/runtime/components/tree/tree.vue +20 -20
  108. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  109. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  110. package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
  111. package/dist/runtime/modals/modals-provider.vue +10 -10
  112. package/dist/runtime/styles/dark-theme.css +1 -1
  113. package/package.json +9 -48
@@ -7,37 +7,37 @@ const { mod } = defineProps({
7
7
  </script>
8
8
 
9
9
  <template>
10
- <Box is='header' :mod :class='$style.root'>
11
- <slot />
12
- </Box>
10
+ <Box is='header' :mod :class='$style.root'>
11
+ <slot />
12
+ </Box>
13
13
  </template>
14
14
 
15
15
  <style module lang="postcss">
16
- .root {
17
- position: fixed;
18
- z-index: 2;
19
- top: 0;
20
- inset-inline: 0;
21
- transform: var(--app-shell-header-transform);
22
-
23
- display: flex;
24
-
25
- height: var(--app-shell-header-height);
26
- padding-block: var(--app-shell-element-padding);
27
- padding-inline: 1rem;
28
-
29
- background-color: var(--color-header);
30
-
31
- transition-timing-function: var(--app-shell-transition-timing-function);
32
- transition-duration: var(--app-shell-transition-duration);
33
- transition-property: transform, left, right;
34
-
35
- :where([data-with-border]) > & {
36
- border-bottom: 1px solid var(--app-shell-border-color);
37
- }
38
-
39
- :where([data-layout='alt']) > & {
40
- inset-inline-start: var(--app-shell-navbar-offset, 0rem);
41
- }
42
- }
16
+ .root {
17
+ position: fixed;
18
+ z-index: 2;
19
+ top: 0;
20
+ inset-inline: 0;
21
+ transform: var(--app-shell-header-transform);
22
+
23
+ display: flex;
24
+
25
+ height: var(--app-shell-header-height);
26
+ padding-block: var(--app-shell-element-padding);
27
+ padding-inline: 1rem;
28
+
29
+ background-color: var(--color-header);
30
+
31
+ transition-timing-function: var(--app-shell-transition-timing-function);
32
+ transition-duration: var(--app-shell-transition-duration);
33
+ transition-property: transform, left, right;
34
+
35
+ :where([data-with-border]) > & {
36
+ border-bottom: 1px solid var(--app-shell-border-color);
37
+ }
38
+
39
+ :where([data-layout='alt']) > & {
40
+ inset-inline-start: var(--app-shell-navbar-offset, 0rem);
41
+ }
42
+ }
43
43
  </style>
@@ -7,41 +7,41 @@ const { mod } = defineProps({
7
7
  </script>
8
8
 
9
9
  <template>
10
- <Box is='nav' :mod :class='$style.root'>
11
- <slot />
12
- </Box>
10
+ <Box is='nav' :mod :class='$style.root'>
11
+ <slot />
12
+ </Box>
13
13
  </template>
14
14
 
15
15
  <style module lang="postcss">
16
- .root {
17
- position: fixed;
18
-
19
- z-index: 1;
20
- top: var(--app-shell-header-offset, 0rem);
21
- inset-inline-start: 0;
22
- transform: var(--app-shell-navbar-transform);
23
-
24
- display: flex;
25
- flex-direction: column;
26
-
27
- width: var(--app-shell-navbar-width);
28
- height: calc(100dvh - var(--app-shell-header-offset, 0rem) - var(--app-shell-footer-offset, 0rem));
29
- padding-block: var(--app-shell-element-padding);
30
-
31
- background-color: var(--color-aside);
32
-
33
- transition-timing-function: var(--app-shell-transition-timing-function);
34
- transition-duration: var(--app-shell-transition-duration);
35
- transition-property: transform, top, height;
36
-
37
- :where([data-layout='alt']) > & {
38
- top: 0;
39
-
40
- height: 100dvh;
41
- }
42
-
43
- :where([data-with-border]) > & {
44
- border-inline-end: 1px solid var(--app-shell-border-color);
45
- }
46
- }
16
+ .root {
17
+ position: fixed;
18
+
19
+ z-index: 1;
20
+ top: var(--app-shell-header-offset, 0rem);
21
+ inset-inline-start: 0;
22
+ transform: var(--app-shell-navbar-transform);
23
+
24
+ display: flex;
25
+ flex-direction: column;
26
+
27
+ width: var(--app-shell-navbar-width);
28
+ height: calc(100dvh - var(--app-shell-header-offset, 0rem) - var(--app-shell-footer-offset, 0rem));
29
+ padding-block: var(--app-shell-element-padding);
30
+
31
+ background-color: var(--color-aside);
32
+
33
+ transition-timing-function: var(--app-shell-transition-timing-function);
34
+ transition-duration: var(--app-shell-transition-duration);
35
+ transition-property: transform, top, height;
36
+
37
+ :where([data-layout='alt']) > & {
38
+ top: 0;
39
+
40
+ height: 100dvh;
41
+ }
42
+
43
+ :where([data-with-border]) > & {
44
+ border-inline-end: 1px solid var(--app-shell-border-color);
45
+ }
46
+ }
47
47
  </style>
@@ -8,17 +8,17 @@ const { is = "section", mod, grow } = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <Box :is :class='$style.root' :mod='[mod, { grow }]'>
12
- <slot />
13
- </Box>
11
+ <Box :is :class='$style.root' :mod='[mod, { grow }]'>
12
+ <slot />
13
+ </Box>
14
14
  </template>
15
15
 
16
16
  <style module lang="postcss">
17
- .root {
18
- flex-grow: 0;
19
-
20
- &:where([data-grow]) {
21
- flex-grow: 1;
22
- }
23
- }
17
+ .root {
18
+ flex-grow: 0;
19
+
20
+ &:where([data-grow]) {
21
+ flex-grow: 1;
22
+ }
23
+ }
24
24
  </style>
@@ -35,41 +35,41 @@ const style = computed(() => ({
35
35
  </script>
36
36
 
37
37
  <template>
38
- <Box :is :style :class='$style.root' :mod='[mod, { layout, "with-border": withBorder }]'>
39
- <slot />
40
- </Box>
38
+ <Box :is :style :class='$style.root' :mod='[mod, { layout, "with-border": withBorder }]'>
39
+ <slot />
40
+ </Box>
41
41
  </template>
42
42
 
43
43
  <style module lang="postcss">
44
- .root {
45
- --app-shell-padding: var(--spacing-sm);
46
- --app-shell-element-padding: .25rem;
47
-
48
- --app-shell-transition-duration: 200ms;
49
- --app-shell-transition-timing-function: ease;
50
-
51
- --app-shell-navbar-width: rem(56px);
52
- --app-shell-navbar-offset: var(--app-shell-navbar-width);
53
- --app-shell-navbar-transform: none;
54
-
55
- --app-shell-aside-width: rem(56px);
56
- --app-shell-aside-offset: var(--app-shell-aside-width);
57
- --app-shell-aside-transform: none;
58
-
59
- --app-shell-header-height: rem(56px);
60
- --app-shell-header-offset: var(--app-shell-header-height);
61
- --app-shell-header-transform: none;
62
-
63
- --app-shell-footer-height: rem(100px);
64
- --app-shell-footer-offset: var(--app-shell-footer-height);
65
- --app-shell-footer-transform: none;
66
-
67
- @mixin light {
68
- --app-shell-border-color: var(--color-gray-3);
69
- }
70
-
71
- @mixin dark {
72
- --app-shell-border-color: var(--color-slate-8);
73
- }
74
- }
44
+ .root {
45
+ --app-shell-padding: var(--spacing-sm);
46
+ --app-shell-element-padding: .25rem;
47
+
48
+ --app-shell-transition-duration: 200ms;
49
+ --app-shell-transition-timing-function: ease;
50
+
51
+ --app-shell-navbar-width: rem(56px);
52
+ --app-shell-navbar-offset: var(--app-shell-navbar-width);
53
+ --app-shell-navbar-transform: none;
54
+
55
+ --app-shell-aside-width: rem(56px);
56
+ --app-shell-aside-offset: var(--app-shell-aside-width);
57
+ --app-shell-aside-transform: none;
58
+
59
+ --app-shell-header-height: rem(56px);
60
+ --app-shell-header-offset: var(--app-shell-header-height);
61
+ --app-shell-header-transform: none;
62
+
63
+ --app-shell-footer-height: rem(100px);
64
+ --app-shell-footer-offset: var(--app-shell-footer-height);
65
+ --app-shell-footer-transform: none;
66
+
67
+ @mixin light {
68
+ --app-shell-border-color: var(--color-gray-3);
69
+ }
70
+
71
+ @mixin dark {
72
+ --app-shell-border-color: var(--color-slate-8);
73
+ }
74
+ }
75
75
  </style>
@@ -16,7 +16,7 @@ useProvideAvatarGroup();
16
16
  </script>
17
17
 
18
18
  <template>
19
- <Box :is :style :mod :class='css.group'>
20
- <slot />
21
- </Box>
19
+ <Box :is :style :mod :class='css.group'>
20
+ <slot />
21
+ </Box>
22
22
  </template>
@@ -54,18 +54,18 @@ const style = computed(() => useStyleResolver((theme) => {
54
54
  </script>
55
55
 
56
56
  <template>
57
- <Box :style :class='css.root' :mod='[{ "within-group": ctx?.withinGroup }, mod]'>
58
- <span v-if='!src' :class='css.placeholder' :title='alt'>
59
- <slot>
60
- <Icon v-if='!src && !name' :name='placeholder' />
61
- {{ initials }}
62
- </slot>
63
- </span>
64
- <NuxtImg
65
- v-else
66
- :src
67
- :alt
68
- :class='css.image'
69
- />
70
- </Box>
57
+ <Box :style :class='css.root' :mod='[{ "within-group": ctx?.withinGroup }, mod]'>
58
+ <span v-if='!src' :class='css.placeholder' :title='alt'>
59
+ <slot>
60
+ <Icon v-if='!src && !name' :name='placeholder' />
61
+ {{ initials }}
62
+ </slot>
63
+ </span>
64
+ <NuxtImg
65
+ v-else
66
+ :src
67
+ :alt
68
+ :class='css.image'
69
+ />
70
+ </Box>
71
71
  </template>
@@ -15,25 +15,25 @@ const style = computed(() => ({
15
15
  </script>
16
16
 
17
17
  <template>
18
- <Box :style :class='$style.root' v-bind='rest' />
18
+ <Box :style :class='$style.root' v-bind='rest' />
19
19
  </template>
20
20
 
21
21
  <style module lang="postcss">
22
- .root {
23
- --bi-radius: 0rem;
24
-
25
- position: absolute;
26
- inset: 0;
27
-
28
- display: block;
29
-
30
- width: 100%;
31
- border: 0;
32
- border-radius: var(--bi-radius, 0);
33
-
34
- text-decoration: none;
35
-
36
- background-position: center;
37
- background-size: cover;
38
- }
22
+ .root {
23
+ --bi-radius: 0rem;
24
+
25
+ position: absolute;
26
+ inset: 0;
27
+
28
+ display: block;
29
+
30
+ width: 100%;
31
+ border: 0;
32
+ border-radius: var(--bi-radius, 0);
33
+
34
+ text-decoration: none;
35
+
36
+ background-position: center;
37
+ background-size: cover;
38
+ }
39
39
  </style>
@@ -43,9 +43,9 @@ const style = computed(() => useStyleResolver((theme) => {
43
43
  </script>
44
44
 
45
45
  <template>
46
- <Box
47
- :style
48
- :class='$style.root'
46
+ <Box
47
+ :style
48
+ :class='$style.root'
49
49
  :mod='[
50
50
  {
51
51
  "block": fullWidth,
@@ -55,164 +55,163 @@ const style = computed(() => useStyleResolver((theme) => {
55
55
  "with-right-section": !!$slots.rightSection
56
56
  },
57
57
  mod
58
- ]'
59
- >
60
- <span v-if='variant === "dot"' :class='$style.dot' />
61
-
62
- <span v-else-if='$slots.leftSection || !!icon' :class='$style.section' data-position='left'>
63
- <slot name='leftSection'>
64
- <Icon v-if='!!icon' :name='icon' />
65
- </slot>
66
- </span>
67
-
68
- <span :class='$style.label'>
69
- <slot />
70
- </span>
71
-
72
- <span v-if='$slots.rightSection' :class='$style.section' data-position='right'>
73
- <slot name='rightSection' />
74
- </span>
75
- </Box>
58
+ ]'
59
+ >
60
+ <span v-if='variant === "dot"' :class='$style.dot' />
61
+
62
+ <span v-else-if='$slots.leftSection || !!icon' :class='$style.section' data-position='left'>
63
+ <slot name='leftSection'>
64
+ <Icon v-if='!!icon' :name='icon' />
65
+ </slot>
66
+ </span>
67
+
68
+ <span :class='$style.label'>
69
+ <slot />
70
+ </span>
71
+
72
+ <span v-if='$slots.rightSection' :class='$style.section' data-position='right'>
73
+ <slot name='rightSection' />
74
+ </span>
75
+ </Box>
76
76
  </template>
77
77
 
78
78
  <style lang="postcss" module>
79
- .root {
80
- --badge-height-xs: rem(16px);
81
- --badge-height-sm: rem(18px);
82
- --badge-height-md: rem(20px);
83
- --badge-height-lg: rem(26px);
84
- --badge-height-xl: rem(32px);
85
-
86
- --badge-fz-xs: rem(8px);
87
- --badge-fz-sm: rem(10px);
88
- --badge-fz-md: rem(12px);
89
- --badge-fz-lg: rem(14px);
90
- --badge-fz-xl: rem(16px);
91
-
92
- --badge-padding-x-xs: rem(6px);
93
- --badge-padding-x-sm: rem(8px);
94
- --badge-padding-x-md: rem(10px);
95
- --badge-padding-x-lg: rem(12px);
96
- --badge-padding-x-xl: rem(16px);
97
-
98
- --badge-height: var(--badge-height-md);
99
- --badge-fz: var(--badge-fz-md);
100
- --badge-padding-x: var(--badge-padding-x-md);
101
- --badge-radius: 100%;
102
- --badge-lh: calc(var(--badge-height) - rem(2px));
103
- --badge-color: var(--color-white);
104
- --badge-bg: var(--color-primary-filled);
105
- --badge-border-width: 1px;
106
- --badge-bd: var(--badge-border-width) solid transparent;
107
-
108
- cursor: default;
109
-
110
- overflow: hidden;
111
- display: inline-grid;
112
- align-items: center;
113
- justify-content: center;
114
-
115
- width: fit-content;
116
- height: var(--badge-height);
117
- padding: 0 var(--badge-padding-x);
118
- border: var(--badge-bd);
119
- border-radius: var(--badge-radius);
120
-
121
- font-size: var(--badge-fz);
122
- font-weight: 700;
123
- line-height: var(--badge-lh);
124
- color: var(--badge-color);
125
- text-decoration: none;
126
- text-overflow: ellipsis;
127
- text-transform: uppercase;
128
- letter-spacing: 0.25px;
129
-
130
- background: var(--badge-bg);
131
-
132
- -webkit-tap-highlight-color: transparent;
133
-
134
- &:where([data-with-left-section], [data-variant='dot']) {
135
- grid-template-columns: auto 1fr;
136
-
137
- padding-left: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
138
- }
139
-
140
- &:where([data-with-right-section]) {
141
- grid-template-columns: 1fr auto;
142
-
143
- padding-right: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
144
- }
145
-
146
- &:where([data-with-left-section][data-with-right-section],
147
- [data-variant='dot'][data-with-right-section]) {
148
- grid-template-columns: auto 1fr auto;
149
-
150
- padding: 0 calc(var(--spacing-xs) / 2);
151
- }
152
-
153
- &:where([data-block]) {
154
- display: flex;
155
-
156
- width: 100%;
157
- }
158
-
159
- &:where([data-circle]) {
160
- display: flex;
161
-
162
- width: var(--badge-height);
163
- padding-inline: 2px;
164
- }
165
-
166
- &:where([data-variant='dot']) {
167
- @mixin where-light {
168
- --badge-color: var(--color-black);
169
- }
170
-
171
- @mixin where-dark {
172
- --badge-color: var(--color-white);
173
- }
174
- }
175
- }
176
-
177
- .dot {
178
- --badge-dot-size: calc(var(--badge-height) / 2);
179
-
180
- display: block;
181
-
182
- width: var(--badge-dot-size);
183
- height: var(--badge-dot-size);
184
- margin-inline-end: calc(var(--badge-dot-size) / 2);
185
- border-radius: var(--badge-dot-size);
186
-
187
- background-color: var(--badge-dot-color, var(--badge-color));
188
- }
189
-
190
-
191
- .label {
192
- cursor: inherit;
193
-
194
- overflow: hidden;
195
-
196
- text-align: center;
197
- text-overflow: ellipsis;
198
- white-space: nowrap;
199
- }
200
-
201
- .section {
202
- --badge-section-margin: calc(var(--spacing-xs) / 2);
203
-
204
- display: inline-flex;
205
- align-items: center;
206
- justify-content: center;
207
-
208
- max-height: calc(var(--badge-height) - var(--badge-border-width) * 2);
209
-
210
- &:where([data-position='left']) {
211
- margin-inline-end: var(--badge-section-margin);
212
- }
213
-
214
- &:where([data-position='right']) {
215
- margin-inline-start: var(--badge-section-margin);
216
- }
217
- }
79
+ .root {
80
+ --badge-height-xs: rem(16px);
81
+ --badge-height-sm: rem(18px);
82
+ --badge-height-md: rem(20px);
83
+ --badge-height-lg: rem(26px);
84
+ --badge-height-xl: rem(32px);
85
+
86
+ --badge-fz-xs: rem(8px);
87
+ --badge-fz-sm: rem(10px);
88
+ --badge-fz-md: rem(12px);
89
+ --badge-fz-lg: rem(14px);
90
+ --badge-fz-xl: rem(16px);
91
+
92
+ --badge-padding-x-xs: rem(6px);
93
+ --badge-padding-x-sm: rem(8px);
94
+ --badge-padding-x-md: rem(10px);
95
+ --badge-padding-x-lg: rem(12px);
96
+ --badge-padding-x-xl: rem(16px);
97
+
98
+ --badge-height: var(--badge-height-md);
99
+ --badge-fz: var(--badge-fz-md);
100
+ --badge-padding-x: var(--badge-padding-x-md);
101
+ --badge-radius: 100%;
102
+ --badge-lh: calc(var(--badge-height) - rem(2px));
103
+ --badge-color: var(--color-white);
104
+ --badge-bg: var(--color-primary-filled);
105
+ --badge-border-width: 1px;
106
+ --badge-bd: var(--badge-border-width) solid transparent;
107
+
108
+ cursor: default;
109
+
110
+ overflow: hidden;
111
+ display: inline-grid;
112
+ align-items: center;
113
+ justify-content: center;
114
+
115
+ width: fit-content;
116
+ height: var(--badge-height);
117
+ padding: 0 var(--badge-padding-x);
118
+ border: var(--badge-bd);
119
+ border-radius: var(--badge-radius);
120
+
121
+ font-size: var(--badge-fz);
122
+ font-weight: 700;
123
+ line-height: var(--badge-lh);
124
+ color: var(--badge-color);
125
+ text-decoration: none;
126
+ text-overflow: ellipsis;
127
+ text-transform: uppercase;
128
+ letter-spacing: 0.25px;
129
+
130
+ background: var(--badge-bg);
131
+
132
+ -webkit-tap-highlight-color: transparent;
133
+
134
+ &:where([data-with-left-section], [data-variant='dot']) {
135
+ grid-template-columns: auto 1fr;
136
+
137
+ padding-left: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
138
+ }
139
+
140
+ &:where([data-with-right-section]) {
141
+ grid-template-columns: 1fr auto;
142
+
143
+ padding-right: calc(var(--badge-padding-x) - calc(var(--spacing-xs) / 2));
144
+ }
145
+
146
+ &:where([data-with-left-section][data-with-right-section],
147
+ [data-variant='dot'][data-with-right-section]) {
148
+ grid-template-columns: auto 1fr auto;
149
+
150
+ padding: 0 calc(var(--spacing-xs) / 2);
151
+ }
152
+
153
+ &:where([data-block]) {
154
+ display: flex;
155
+
156
+ width: 100%;
157
+ }
158
+
159
+ &:where([data-circle]) {
160
+ display: flex;
161
+
162
+ width: var(--badge-height);
163
+ padding-inline: 2px;
164
+ }
165
+
166
+ &:where([data-variant='dot']) {
167
+ @mixin where-light {
168
+ --badge-color: var(--color-black);
169
+ }
170
+
171
+ @mixin where-dark {
172
+ --badge-color: var(--color-white);
173
+ }
174
+ }
175
+ }
176
+
177
+ .dot {
178
+ --badge-dot-size: calc(var(--badge-height) / 2);
179
+
180
+ display: block;
181
+
182
+ width: var(--badge-dot-size);
183
+ height: var(--badge-dot-size);
184
+ margin-inline-end: calc(var(--badge-dot-size) / 2);
185
+ border-radius: var(--badge-dot-size);
186
+
187
+ background-color: var(--badge-dot-color, var(--badge-color));
188
+ }
189
+
190
+ .label {
191
+ cursor: inherit;
192
+
193
+ overflow: hidden;
194
+
195
+ text-align: center;
196
+ text-overflow: ellipsis;
197
+ white-space: nowrap;
198
+ }
199
+
200
+ .section {
201
+ --badge-section-margin: calc(var(--spacing-xs) / 2);
202
+
203
+ display: inline-flex;
204
+ align-items: center;
205
+ justify-content: center;
206
+
207
+ max-height: calc(var(--badge-height) - var(--badge-border-width) * 2);
208
+
209
+ &:where([data-position='left']) {
210
+ margin-inline-end: var(--badge-section-margin);
211
+ }
212
+
213
+ &:where([data-position='right']) {
214
+ margin-inline-start: var(--badge-section-margin);
215
+ }
216
+ }
218
217
  </style>