nuance-ui 0.1.62 → 0.2.0

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 (130) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +75 -75
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +11 -6
  5. package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
  6. package/dist/runtime/components/action-icon/action-icon.vue +22 -22
  7. package/dist/runtime/components/alert.vue +128 -128
  8. package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
  9. package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
  10. package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
  11. package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
  12. package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
  13. package/dist/runtime/components/app-shell/app-shell.vue +34 -34
  14. package/dist/runtime/components/avatar/avatar-group.vue +3 -3
  15. package/dist/runtime/components/avatar/avatar.vue +14 -14
  16. package/dist/runtime/components/background-image.vue +18 -18
  17. package/dist/runtime/components/badge.vue +160 -159
  18. package/dist/runtime/components/box.vue +3 -3
  19. package/dist/runtime/components/breadcrumbs.vue +78 -78
  20. package/dist/runtime/components/button/button-group.vue +3 -3
  21. package/dist/runtime/components/button/button.vue +37 -37
  22. package/dist/runtime/components/button/unstyled-button.vue +23 -23
  23. package/dist/runtime/components/calendar/calendar.vue +60 -60
  24. package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +115 -115
  25. package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
  26. package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
  27. package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +41 -37
  28. package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
  29. package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +41 -41
  30. package/dist/runtime/components/card/card-section.vue +3 -3
  31. package/dist/runtime/components/card/card.vue +3 -3
  32. package/dist/runtime/components/checkbox/checkbox-card.vue +36 -36
  33. package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
  34. package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
  35. package/dist/runtime/components/checkbox/checkbox.vue +140 -140
  36. package/dist/runtime/components/chip/chip-group.vue +2 -2
  37. package/dist/runtime/components/chip/chip.vue +200 -200
  38. package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
  39. package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
  40. package/dist/runtime/components/combobox/combobox-group.vue +21 -21
  41. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
  42. package/dist/runtime/components/combobox/combobox-option.vue +26 -26
  43. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
  44. package/dist/runtime/components/combobox/combobox-root.vue +3 -3
  45. package/dist/runtime/components/combobox/combobox-target.vue +3 -3
  46. package/dist/runtime/components/container.vue +8 -8
  47. package/dist/runtime/components/date-time-picker.vue +65 -65
  48. package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
  49. package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
  50. package/dist/runtime/components/dialog/ui/dialog-root.vue +20 -20
  51. package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
  52. package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
  53. package/dist/runtime/components/drawer/drawer-header.vue +3 -3
  54. package/dist/runtime/components/drawer/drawer-root.vue +15 -15
  55. package/dist/runtime/components/drawer/drawer-title.vue +3 -3
  56. package/dist/runtime/components/files/file-upload-button.vue +12 -12
  57. package/dist/runtime/components/files/file-upload-icon.vue +1 -1
  58. package/dist/runtime/components/input/date-picker.vue +85 -85
  59. package/dist/runtime/components/input/email-input.vue +21 -21
  60. package/dist/runtime/components/input/number-input.vue +132 -132
  61. package/dist/runtime/components/input/password-input.vue +28 -28
  62. package/dist/runtime/components/input/text-input.vue +33 -33
  63. package/dist/runtime/components/input/ui/button-input.vue +64 -64
  64. package/dist/runtime/components/input/ui/input-base.vue +283 -283
  65. package/dist/runtime/components/input/ui/input-inline.vue +105 -105
  66. package/dist/runtime/components/input/ui/input-label.vue +4 -4
  67. package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
  68. package/dist/runtime/components/input/ui/spin-input.vue +69 -69
  69. package/dist/runtime/components/link/link-button.vue +16 -16
  70. package/dist/runtime/components/link/link.vue +10 -10
  71. package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
  72. package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
  73. package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
  74. package/dist/runtime/components/loader/loader.vue +1 -1
  75. package/dist/runtime/components/modal/modal-close-button.vue +3 -3
  76. package/dist/runtime/components/modal/modal-header.vue +3 -3
  77. package/dist/runtime/components/modal/modal-root.vue +13 -13
  78. package/dist/runtime/components/modal/modal-title.vue +3 -3
  79. package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
  80. package/dist/runtime/components/nav-link/nav-link.vue +130 -130
  81. package/dist/runtime/components/paper.vue +33 -33
  82. package/dist/runtime/components/popover/popover-dropdown.vue +70 -69
  83. package/dist/runtime/components/popover/popover-target.vue +8 -8
  84. package/dist/runtime/components/popover/popover.vue +1 -1
  85. package/dist/runtime/components/progress/progress-label.vue +3 -3
  86. package/dist/runtime/components/progress/progress-root.vue +3 -3
  87. package/dist/runtime/components/progress/progress-section.vue +8 -8
  88. package/dist/runtime/components/progress/progress.vue +9 -9
  89. package/dist/runtime/components/renderless/renderless.vue +3 -3
  90. package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
  91. package/dist/runtime/components/roving-focus/roving-focus.vue +3 -3
  92. package/dist/runtime/components/select/select.vue +59 -59
  93. package/dist/runtime/components/table/table.d.ts +30 -30
  94. package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
  95. package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
  96. package/dist/runtime/components/table/ui/table.vue +295 -295
  97. package/dist/runtime/components/tabs/tabs-list.vue +10 -10
  98. package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
  99. package/dist/runtime/components/tabs/tabs-root.vue +8 -8
  100. package/dist/runtime/components/tabs/tabs-tab.vue +20 -20
  101. package/dist/runtime/components/text.vue +67 -67
  102. package/dist/runtime/components/textarea.vue +34 -34
  103. package/dist/runtime/components/time-picker/time-picker.vue +230 -230
  104. package/dist/runtime/components/title.vue +14 -14
  105. package/dist/runtime/components/transition/transition.vue +3 -3
  106. package/dist/runtime/components/tree/_ui/tree-item.vue +129 -128
  107. package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
  108. package/dist/runtime/components/tree/tree.vue +20 -20
  109. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
  110. package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
  111. package/dist/runtime/helpers/date/create-months.js +1 -1
  112. package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
  113. package/dist/runtime/modals/modals-provider.vue +10 -10
  114. package/dist/runtime/utils/color-functions/get-gradient.js +1 -1
  115. package/dist/runtime/utils/{parse-theme-color → color-functions}/parse-theme-color.js +1 -1
  116. package/dist/runtime/utils/{vars-resolver/create-variant-color-resolver.js → create-variant-color-resolver.js} +3 -3
  117. package/dist/runtime/utils/{get-size/get-size.js → get-size.js} +2 -2
  118. package/dist/runtime/utils/index.d.ts +3 -5
  119. package/dist/runtime/utils/index.js +3 -5
  120. package/package.json +2 -2
  121. package/dist/runtime/server/tsconfig.json +0 -3
  122. package/dist/runtime/utils/chunk.d.ts +0 -12
  123. package/dist/runtime/utils/chunk.js +0 -6
  124. package/dist/runtime/utils/get-safe-id.d.ts +0 -1
  125. package/dist/runtime/utils/get-safe-id.js +0 -8
  126. /package/dist/runtime/utils/{get-color-var.d.ts → color-functions/get-color-var.d.ts} +0 -0
  127. /package/dist/runtime/utils/{get-color-var.js → color-functions/get-color-var.js} +0 -0
  128. /package/dist/runtime/utils/{parse-theme-color → color-functions}/parse-theme-color.d.ts +0 -0
  129. /package/dist/runtime/utils/{vars-resolver/create-variant-color-resolver.d.ts → create-variant-color-resolver.d.ts} +0 -0
  130. /package/dist/runtime/utils/{get-size/get-size.d.ts → get-size.d.ts} +0 -0
@@ -51,135 +51,136 @@ const { handleClick, handleKeyDown } = useTreeItemHandlers(path, isFolder, expan
51
51
  </script>
52
52
 
53
53
  <template>
54
- <li :class='$style.item' role='presentation'>
55
- <RovingFocusItem>
56
- <Button
57
- :size='ctx.size'
58
- :color='ctx.color'
59
- :variant='ctx.variant'
60
- :disabled
61
- role='treeitem'
62
- :classes='$style'
63
- :aria-level='level'
64
- :aria-selected='selected'
65
- :mod='{ active, selected, "tree-item": path }'
66
- right-section-p-e='all'
67
- @click.prevent='handleClick'
68
- @keydown.prevent='handleKeyDown'
69
- >
70
- <template #leftSection>
71
- <template v-if='pending'>
72
- <Loader :class='$style.icon' />
73
- </template>
74
-
75
- <template v-else-if='isFolder'>
76
- <Icon v-if='expanded' :class='$style.icon' :name='trailingIcon' />
77
- <Icon v-else :class='$style.icon' :name='icon' />
78
- </template>
79
-
80
- <template v-else>
81
- <Icon
82
- :class='$style.icon'
83
- :name='fileIcon'
84
- :style='{ color: color && getThemeColor(color, theme) }'
85
- />
86
- </template>
87
- </template>
88
-
89
- {{ name ?? path }}
90
-
91
- <template v-if='isFolder' #rightSection>
92
- <ActionIcon
93
- icon='gravity-ui:chevron-down'
94
- size='sm'
95
- :color='ctx.color'
96
- :classes='{ root: $style.chevron, icon: $style["chevron-icon"] }'
97
- :mod='{ expanded }'
98
- variant='subtle'
99
- @click.stop='ctx.toggle("expand", path)'
100
- />
101
- </template>
102
- </Button>
103
- </RovingFocusItem>
104
-
105
- <UTransition name='scale-y'>
106
- <ul
107
- v-if='expanded && data && data.length > 0'
108
- :class='$style.list'
109
- role='group'
110
- >
111
- <TreeItem
112
- v-for='child in data'
113
- :key='child.path'
114
- v-bind='child'
115
- :path='child.path'
116
- :level='level + 1'
117
- />
118
- </ul>
119
- </UTransition>
120
- </li>
54
+ <li :class='$style.item' role='presentation'>
55
+ <RovingFocusItem>
56
+ <Button
57
+ :size='ctx.size'
58
+ :color='ctx.color'
59
+ :variant='ctx.variant'
60
+ :disabled
61
+ role='treeitem'
62
+ :classes='$style'
63
+ :aria-level='level'
64
+ :aria-selected='selected'
65
+ :mod='{ active, selected, "tree-item": path }'
66
+ right-section-p-e='all'
67
+ @click.prevent='handleClick'
68
+ @keydown.prevent='handleKeyDown'
69
+ >
70
+ <template #leftSection>
71
+ <template v-if='pending'>
72
+ <Loader :class='$style.icon' />
73
+ </template>
74
+
75
+ <template v-else-if='isFolder'>
76
+ <Icon v-if='expanded' :class='$style.icon' :name='trailingIcon' />
77
+ <Icon v-else :class='$style.icon' :name='icon' />
78
+ </template>
79
+
80
+ <template v-else>
81
+ <Icon
82
+ :class='$style.icon'
83
+ :name='fileIcon'
84
+ :style='{ color: color && getThemeColor(color, theme) }'
85
+ />
86
+ </template>
87
+ </template>
88
+
89
+ {{ name ?? path }}
90
+
91
+ <template v-if='isFolder' #rightSection>
92
+ <ActionIcon
93
+ icon='gravity-ui:chevron-down'
94
+ size='sm'
95
+ :color='ctx.color'
96
+ :classes='{ root: $style.chevron, icon: $style["chevron-icon"] }'
97
+ :mod='{ expanded }'
98
+ variant='subtle'
99
+ @click.stop='ctx.toggle("expand", path)'
100
+ />
101
+ </template>
102
+ </Button>
103
+ </RovingFocusItem>
104
+
105
+ <UTransition name='scale-y'>
106
+ <ul
107
+ v-if='expanded && data && data.length > 0'
108
+ :class='$style.list'
109
+ role='group'
110
+ >
111
+ <TreeItem
112
+ v-for='child in data'
113
+ :key='child.path'
114
+ v-bind='child'
115
+ :path='child.path'
116
+ :level='level + 1'
117
+ />
118
+ </ul>
119
+ </UTransition>
120
+ </li>
121
121
  </template>
122
122
 
123
123
  <style module lang="postcss">
124
- .item {
125
- display: grid;
126
- gap: .25rem;
127
- }
128
-
129
- .icon {
130
- --loader-size: var(--tree-icon-size);
131
-
132
- width: var(--tree-icon-size);
133
- height: var(--tree-icon-size);
134
- }
135
-
136
- .chevron {
137
- color: var(--color-dimmed);
138
-
139
- transition: transform .3s ease-in-out;
140
-
141
- &:hover {
142
- color: var(--color-dimmed);
143
-
144
- background-color: transparent;
145
- }
146
-
147
- &[data-expanded] .chevron-icon {
148
- transform: rotate(-180deg);
149
- }
150
- }
151
-
152
- .list {
153
- display: grid;
154
- gap: .25rem;
155
-
156
- margin-inline-start: 1rem;
157
-
158
- padding-inline-start: .75rem;
159
- border-left: 1px solid var(--color-gray-4);
160
- }
161
-
162
- .root {
163
- .inner {
164
- display: grid;
165
- grid-template-columns: auto 1fr auto;
166
-
167
- color: var(--color-text);
168
-
169
- .label {
170
- font-weight: 500;
171
- }
172
- }
173
-
174
- &[data-active],
175
- &[data-selected] {
176
- .inner {
177
- color: var(--button-color);
178
- }
179
- }
180
-
181
- &[data-selected] {
182
- background: alpha(var(--button-color), .1);
183
- }
184
- }
124
+ .item {
125
+ display: grid;
126
+ gap: .25rem;
127
+ }
128
+
129
+ .icon {
130
+ --loader-size: var(--tree-icon-size);
131
+
132
+ width: var(--tree-icon-size);
133
+ height: var(--tree-icon-size);
134
+ }
135
+
136
+ .chevron {
137
+ color: var(--color-dimmed);
138
+
139
+ transition: transform .3s ease-in-out;
140
+
141
+ &:hover {
142
+ color: var(--color-dimmed);
143
+
144
+ background-color: transparent;
145
+ }
146
+
147
+ &[data-expanded] .chevron-icon {
148
+ transform: rotate(-180deg);
149
+ }
150
+ }
151
+
152
+
153
+ .list {
154
+ display: grid;
155
+ gap: .25rem;
156
+
157
+ margin-inline-start: 1rem;
158
+
159
+ padding-inline-start: .75rem;
160
+ border-left: 1px solid var(--color-gray-4);
161
+ }
162
+
163
+ .root {
164
+ .inner {
165
+ display: grid;
166
+ grid-template-columns: auto 1fr auto;
167
+
168
+ color: var(--color-text);
169
+
170
+ .label {
171
+ font-weight: 500;
172
+ }
173
+ }
174
+
175
+ &[data-active],
176
+ &[data-selected] {
177
+ .inner {
178
+ color: var(--button-color);
179
+ }
180
+ }
181
+
182
+ &[data-selected] {
183
+ background: alpha(var(--button-color), .1);
184
+ }
185
+ }
185
186
  </style>
@@ -64,28 +64,28 @@ if (removable) {
64
64
  </script>
65
65
 
66
66
  <template>
67
- <RovingFocus :attr :loop :orientation>
68
- <Box
69
- is='ul'
70
- ref='parent'
71
- role='tree'
72
- :style
73
- :class='$style.root'
74
- @keydown.esc.prevent='selected = []'
75
- >
76
- <slot />
77
- </Box>
78
- </RovingFocus>
67
+ <RovingFocus :attr :loop :orientation>
68
+ <Box
69
+ is='ul'
70
+ ref='parent'
71
+ role='tree'
72
+ :style
73
+ :class='$style.root'
74
+ @keydown.esc.prevent='selected = []'
75
+ >
76
+ <slot />
77
+ </Box>
78
+ </RovingFocus>
79
79
  </template>
80
80
 
81
81
  <style module lang="postcss">
82
- .root {
83
- --tree-icon-size: var(--spacing-md);
84
-
85
- display: flex;
86
- flex-direction: column;
87
- gap: .25rem;
88
-
89
- padding-inline-start: 0;
90
- }
82
+ .root {
83
+ --tree-icon-size: var(--spacing-md);
84
+
85
+ display: flex;
86
+ flex-direction: column;
87
+ gap: .25rem;
88
+
89
+ padding-inline-start: 0;
90
+ }
91
91
  </style>
@@ -33,24 +33,24 @@ onMounted(execute);
33
33
  </script>
34
34
 
35
35
  <template>
36
- <TreeRoot
37
- v-bind='props'
38
- v-model:active='active'
39
- v-model:selected='selected'
40
- v-model:expanded='expanded'
41
- :load-branch
42
- :size
43
- :color
44
- :variant
45
- :filter
46
- @delete='(path) => $emit("delete", path)'
47
- >
48
- <UTreeItem
49
- v-for='item in root'
50
- :key='item.path'
51
- v-bind='item'
52
- :path='item.path'
53
- :level='1'
54
- />
55
- </TreeRoot>
36
+ <TreeRoot
37
+ v-bind='props'
38
+ v-model:active='active'
39
+ v-model:selected='selected'
40
+ v-model:expanded='expanded'
41
+ :load-branch
42
+ :size
43
+ :color
44
+ :variant
45
+ :filter
46
+ @delete='(path) => $emit("delete", path)'
47
+ >
48
+ <UTreeItem
49
+ v-for='item in root'
50
+ :key='item.path'
51
+ v-bind='item'
52
+ :path='item.path'
53
+ :level='1'
54
+ />
55
+ </TreeRoot>
56
56
  </template>
@@ -12,5 +12,5 @@ const value = defineModel({ type: null });
12
12
  </script>
13
13
 
14
14
  <template>
15
- <VisuallyHidden v-bind='{ ...props, ...$attrs }' is='input' v-model='value' />
15
+ <VisuallyHidden v-bind='{ ...props, ...$attrs }' is='input' v-model='value' />
16
16
  </template>
@@ -8,15 +8,15 @@ const { feature, ...rest } = defineProps({
8
8
  </script>
9
9
 
10
10
  <template>
11
- <Box
12
- :aria-hidden='feature === "focusable" ? "true" : void 0'
13
- :data-hidden='feature === "fully-hidden" ? "true" : void 0'
14
- :tabindex='feature === "fully-hidden" ? "-1" : void 0'
15
- v-bind='rest'
16
- class='root'
17
- >
18
- <slot />
19
- </Box>
11
+ <Box
12
+ :aria-hidden='feature === "focusable" ? "true" : void 0'
13
+ :data-hidden='feature === "fully-hidden" ? "true" : void 0'
14
+ :tabindex='feature === "fully-hidden" ? "-1" : void 0'
15
+ v-bind='rest'
16
+ class='root'
17
+ >
18
+ <slot />
19
+ </Box>
20
20
  </template>
21
21
 
22
22
  <style scoped>
@@ -1,5 +1,5 @@
1
1
  import { addDay, monthEnd, monthStart, weekEnd, weekStart } from "@formkit/tempo";
2
- import { chunk } from "@nui/utils";
2
+ import { chunk } from "es-toolkit";
3
3
  import { getDaysBetween } from "./get-days-between.js";
4
4
  export function createMonth(date, config, fixedWeeks) {
5
5
  const startOfMonth = monthStart(date);
@@ -45,37 +45,37 @@ async function hanleConfirm() {
45
45
  </script>
46
46
 
47
47
  <template>
48
- <ModalRoot v-model:open='opened' v-bind='rest' :close-on-click-outside size='sm'>
49
- <ModalHeader>
50
- <Title order='4'>
51
- {{ title }}
52
- </Title>
53
- <ModalCloseButton />
54
- </ModalHeader>
55
-
56
- <p v-if='body' :class='$style.body'>
57
- {{ body }}
58
- </p>
59
-
60
- <footer :class='$style.footer'>
61
- <Button
62
- variant='default'
63
- v-bind='cancelProps'
64
- @click='handleCancel()'
65
- >
66
- {{ labels?.cancel ?? "Cancel" }}
67
- </Button>
68
- <Button
69
- variant='filled'
70
- v-bind='confirmProps'
71
- :color="variant === 'danger' ? 'red' : void 0"
72
- :loading
73
- @click='hanleConfirm()'
74
- >
75
- {{ labels?.confirm ?? "Confirm" }}
76
- </Button>
77
- </footer>
78
- </ModalRoot>
48
+ <ModalRoot v-model:open='opened' v-bind='rest' :close-on-click-outside size='sm'>
49
+ <ModalHeader>
50
+ <Title order='4'>
51
+ {{ title }}
52
+ </Title>
53
+ <ModalCloseButton />
54
+ </ModalHeader>
55
+
56
+ <p v-if='body' :class='$style.body'>
57
+ {{ body }}
58
+ </p>
59
+
60
+ <footer :class='$style.footer'>
61
+ <Button
62
+ variant='default'
63
+ v-bind='cancelProps'
64
+ @click='handleCancel()'
65
+ >
66
+ {{ labels?.cancel ?? "Cancel" }}
67
+ </Button>
68
+ <Button
69
+ variant='filled'
70
+ v-bind='confirmProps'
71
+ :color="variant === 'danger' ? 'red' : void 0"
72
+ :loading
73
+ @click='hanleConfirm()'
74
+ >
75
+ {{ labels?.confirm ?? "Confirm" }}
76
+ </Button>
77
+ </footer>
78
+ </ModalRoot>
79
79
  </template>
80
80
 
81
81
  <style module>
@@ -9,14 +9,14 @@ defineExpose({
9
9
  </script>
10
10
 
11
11
  <template>
12
- <ClientOnly>
13
- <div id='nui-modals-root'>
14
- <component
15
- :is='entry.component'
16
- v-for='[id, entry] in $props.manager?.modals ?? $modals.modals'
17
- :key='id'
18
- v-bind='entry.props'
19
- />
20
- </div>
21
- </ClientOnly>
12
+ <ClientOnly>
13
+ <div id='nui-modals-root'>
14
+ <component
15
+ :is='entry.component'
16
+ v-for='[id, entry] in $props.manager?.modals ?? $modals.modals'
17
+ :key='id'
18
+ v-bind='entry.props'
19
+ />
20
+ </div>
21
+ </ClientOnly>
22
22
  </template>
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_GRADIENT } from "../../const/index.js";
2
- import { parseThemeColor } from "../parse-theme-color/parse-theme-color.js";
2
+ import { parseThemeColor } from "./parse-theme-color.js";
3
3
  export function getGradient(gradient, theme) {
4
4
  const merged = {
5
5
  from: gradient?.from || DEFAULT_GRADIENT.from,
@@ -1,4 +1,4 @@
1
- import { getColorVar } from "../get-color-var.js";
1
+ import { getColorVar } from "./get-color-var.js";
2
2
  const themeColors = [
3
3
  "dark",
4
4
  "slate",
@@ -1,6 +1,6 @@
1
- import { DEFAULT_GRADIENT } from "../../const/index.js";
2
- import { getGradient, getGradientOutline } from "../color-functions/get-gradient.js";
3
- import { getThemeColor, parseThemeColor } from "../parse-theme-color/parse-theme-color.js";
1
+ import { DEFAULT_GRADIENT } from "../const/index.js";
2
+ import { getGradient, getGradientOutline } from "./color-functions/get-gradient.js";
3
+ import { getThemeColor, parseThemeColor } from "./color-functions/parse-theme-color.js";
4
4
  export function createVariantColorResolver({
5
5
  color = "primary",
6
6
  variant,
@@ -1,5 +1,5 @@
1
- import { isNumberLike } from "../boolean/is-number-like.js";
2
- import { rem } from "../converters/rem.js";
1
+ import { isNumberLike } from "./boolean/is-number-like.js";
2
+ import { rem } from "./converters/rem.js";
3
3
  export function getSize(size, prefix = "size", convertToRem = true) {
4
4
  if (size === void 0) {
5
5
  return void 0;
@@ -1,10 +1,8 @@
1
1
  export { isFalsy } from './boolean/is-falsy.js';
2
- export * from './chunk.js';
3
2
  export { getGradient } from './color-functions/get-gradient.js';
3
+ export { getThemeColor, parseThemeColor } from './color-functions/parse-theme-color.js';
4
4
  export { em, rem } from './converters/rem.js';
5
+ export { createVariantColorResolver } from './create-variant-color-resolver.js';
5
6
  export * from './get-mod.js';
6
- export { getSafeId } from './get-safe-id.js';
7
- export * from './get-size/get-size.js';
8
- export { getThemeColor, parseThemeColor } from './parse-theme-color/parse-theme-color.js';
7
+ export * from './get-size.js';
9
8
  export * from './tree.js';
10
- export { createVariantColorResolver } from './vars-resolver/create-variant-color-resolver.js';
@@ -1,10 +1,8 @@
1
1
  export { isFalsy } from "./boolean/is-falsy.js";
2
- export * from "./chunk.js";
3
2
  export { getGradient } from "./color-functions/get-gradient.js";
3
+ export { getThemeColor, parseThemeColor } from "./color-functions/parse-theme-color.js";
4
4
  export { em, rem } from "./converters/rem.js";
5
+ export { createVariantColorResolver } from "./create-variant-color-resolver.js";
5
6
  export * from "./get-mod.js";
6
- export { getSafeId } from "./get-safe-id.js";
7
- export * from "./get-size/get-size.js";
8
- export { getThemeColor, parseThemeColor } from "./parse-theme-color/parse-theme-color.js";
7
+ export * from "./get-size.js";
9
8
  export * from "./tree.js";
10
- export { createVariantColorResolver } from "./vars-resolver/create-variant-color-resolver.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuance-ui",
3
- "version": "0.1.62",
3
+ "version": "0.2.0",
4
4
  "description": "A UI Library for Modern Web Apps, powered by Vue.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,7 @@
30
30
  "dev": "npm run dev:prepare && nuxi dev playground",
31
31
  "dev:build": "nuxi build playground",
32
32
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
33
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
33
+ "release": "npm run lint && npm run test && npm run prepack && changelogen --release --major && npm publish && git push --follow-tags",
34
34
  "lint": "eslint .",
35
35
  "test": "vitest run",
36
36
  "test:watch": "vitest watch",
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "../../../.nuxt/tsconfig.server.json"
3
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Splits an array into chunks of a given size.
3
- * @param arr The array to split.
4
- * @param size The size of each chunk.
5
- * @returns An array of arrays, where each sub-array has `size` elements from the original array.
6
- * @example ```ts
7
- * const arr = [1, 2, 3, 4, 5, 6, 7, 8];
8
- * const chunks = chunk(arr, 3);
9
- * // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]
10
- * ```
11
- */
12
- export declare function chunk<T>(arr: T[], size: number): T[][];
@@ -1,6 +0,0 @@
1
- export function chunk(arr, size) {
2
- const result = [];
3
- for (let i = 0; i < arr.length; i += size)
4
- result.push(arr.slice(i, i + size));
5
- return result;
6
- }
@@ -1 +0,0 @@
1
- export declare function getSafeId(uid: string, errorMessage: string): (value: string) => string;
@@ -1,8 +0,0 @@
1
- export function getSafeId(uid, errorMessage) {
2
- return (value) => {
3
- if (typeof value !== "string" || value.trim().length === 0) {
4
- throw new Error(errorMessage);
5
- }
6
- return `${uid}-${value}`;
7
- };
8
- }