@indielayer/ui 1.0.8 → 1.0.10

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 (98) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/{lib/nuxt.js → exports/nuxt.mjs} +1 -1
  4. package/{src/exports → exports}/nuxt.plugin.js +1 -1
  5. package/lib/components/alert/Alert.vue.d.ts +11 -2
  6. package/lib/components/avatar/Avatar.vue.d.ts +9 -2
  7. package/lib/components/badge/Badge.vue.d.ts +10 -2
  8. package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +2 -2
  9. package/lib/components/button/Button.vue.d.ts +9 -2
  10. package/lib/components/button/ButtonGroup.vue.d.ts +9 -2
  11. package/lib/components/card/Card.vue.d.ts +8 -1
  12. package/lib/components/checkbox/Checkbox.vue.d.ts +12 -4
  13. package/lib/components/collapse/Collapse.vue.d.ts +15 -1
  14. package/lib/components/container/Container.vue.d.ts +8 -1
  15. package/lib/components/divider/Divider.vue.d.ts +1 -1
  16. package/lib/components/drawer/Drawer.vue.d.ts +11 -2
  17. package/lib/components/form/Form.vue.d.ts +10 -3
  18. package/lib/components/helpers/InputError.d.ts +2 -2
  19. package/lib/components/icon/Icon.vue.d.ts +1 -1
  20. package/lib/components/image/Image.vue.d.ts +1 -1
  21. package/lib/components/input/Input.vue.d.ts +4 -4
  22. package/lib/components/link/Link.vue.d.ts +8 -1
  23. package/lib/components/menu/Menu.vue.d.ts +1 -1
  24. package/lib/components/menu/MenuItem.vue.d.ts +19 -1
  25. package/lib/components/modal/Modal.vue.d.ts +11 -1
  26. package/lib/components/notifications/Notifications.vue.d.ts +13 -6
  27. package/lib/components/pagination/Pagination.vue.d.ts +1 -1
  28. package/lib/components/pagination/PaginationItem.vue.d.ts +1 -1
  29. package/lib/components/popover/Popover.vue.d.ts +11 -3
  30. package/lib/components/popover/PopoverContainer.vue.d.ts +8 -1
  31. package/lib/components/progress/Progress.theme.d.ts +3 -1
  32. package/lib/components/progress/Progress.vue.d.ts +2 -2
  33. package/lib/components/radio/Radio.vue.d.ts +11 -4
  34. package/lib/components/scroll/Scroll.vue.d.ts +8 -1
  35. package/lib/components/select/Select.vue.d.ts +11 -4
  36. package/lib/components/skeleton/Skeleton.vue.d.ts +1 -1
  37. package/lib/components/slider/Slider.vue.d.ts +16 -4
  38. package/lib/components/spacer/Spacer.d.ts +1 -1
  39. package/lib/components/spinner/Spinner.vue.d.ts +1 -1
  40. package/lib/components/tab/Tab.vue.d.ts +14 -1
  41. package/lib/components/tab/TabGroup.vue.d.ts +8 -1
  42. package/lib/components/table/Table.vue.d.ts +12 -5
  43. package/lib/components/table/TableBody.d.ts +1 -1
  44. package/lib/components/table/TableCell.vue.d.ts +8 -1
  45. package/lib/components/table/TableHead.d.ts +1 -1
  46. package/lib/components/table/TableHeader.vue.d.ts +10 -3
  47. package/lib/components/table/TableRow.vue.d.ts +8 -1
  48. package/lib/components/tag/Tag.vue.d.ts +9 -2
  49. package/lib/components/textarea/Textarea.vue.d.ts +3 -3
  50. package/lib/components/toggle/Toggle.vue.d.ts +4 -4
  51. package/lib/components/tooltip/Tooltip.vue.d.ts +9 -1
  52. package/lib/composables/colors.d.ts +4 -3
  53. package/lib/composables/common.d.ts +1 -1
  54. package/lib/composables/css.d.ts +1 -1
  55. package/lib/composables/notifications.d.ts +1 -1
  56. package/lib/composables/theme.d.ts +1 -1
  57. package/lib/create.d.ts +1 -1
  58. package/lib/index.cjs.js +1 -1
  59. package/lib/index.es.js +3964 -5955
  60. package/lib/version.d.ts +1 -1
  61. package/package.json +51 -51
  62. package/src/components/alert/Alert.vue +2 -1
  63. package/src/components/avatar/Avatar.vue +2 -1
  64. package/src/components/breadcrumbs/Breadcrumbs.vue +7 -7
  65. package/src/components/button/Button.theme.ts +5 -11
  66. package/src/components/button/Button.vue +2 -1
  67. package/src/components/button/ButtonGroup.vue +4 -4
  68. package/src/components/checkbox/Checkbox.vue +1 -1
  69. package/src/components/collapse/Collapse.vue +12 -12
  70. package/src/components/drawer/Drawer.vue +24 -24
  71. package/src/components/form/Form.vue +8 -9
  72. package/src/components/input/Input.vue +2 -2
  73. package/src/components/link/Link.vue +5 -2
  74. package/src/components/menu/MenuItem.vue +16 -6
  75. package/src/components/modal/Modal.vue +1 -1
  76. package/src/components/notifications/Notifications.vue +16 -16
  77. package/src/components/popover/Popover.vue +31 -27
  78. package/src/components/radio/Radio.vue +3 -2
  79. package/src/components/scroll/Scroll.vue +23 -16
  80. package/src/components/select/Select.vue +3 -4
  81. package/src/components/table/Table.vue +6 -6
  82. package/src/components/table/TableCell.vue +2 -2
  83. package/src/components/table/TableHeader.vue +2 -2
  84. package/src/components/table/TableRow.vue +1 -1
  85. package/src/components/textarea/Textarea.vue +0 -0
  86. package/src/composables/colors-utils.ts +3 -268
  87. package/src/composables/colors.ts +16 -14
  88. package/src/composables/css.ts +4 -4
  89. package/src/composables/inputtable.ts +4 -4
  90. package/src/composables/interactive.ts +2 -2
  91. package/src/composables/theme.ts +6 -6
  92. package/src/create.ts +5 -5
  93. package/src/version.ts +1 -1
  94. package/volar.d.ts +1 -3
  95. package/lib/nuxt.plugin.js +0 -8
  96. package/src/exports/nuxt.js +0 -33
  97. package/src/exports/tailwind.preset.js +0 -55
  98. /package/{lib → exports}/tailwind.preset.js +0 -0
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  const validators = {
3
- align: ['bottom','center','left','right','top'],
4
- position: ['bottom','left','right','top'],
3
+ align: ['bottom', 'center', 'left', 'right', 'top'],
4
+ position: ['bottom', 'left', 'right', 'top'],
5
5
  }
6
6
 
7
7
  export default {
@@ -47,7 +47,7 @@ const elRef = ref<HTMLElement | null>(null)
47
47
  const contentRef = ref<HTMLElement | null>(null)
48
48
  const isOpen = ref(false)
49
49
 
50
- let stopClickOutside: undefined | (()=> void) = undefined
50
+ let stopClickOutside: undefined | (() => void) = undefined
51
51
 
52
52
  watch(isOpen, (newValue) => {
53
53
  if (props.hover) return
@@ -101,10 +101,10 @@ const contentClasses = computed(() => {
101
101
  else if ((position === 'top' || position === 'bottom')) align = 'right'
102
102
  }
103
103
 
104
- if (position === 'top') c.push(`bottom-full ${$style.popoverTop}`)
105
- if (position === 'bottom') c.push(`top-full bottom-0 ${$style.popoverBottom}`)
106
- if (position === 'right') c.push(`left-full ${$style.popoverRight}`)
107
- if (position === 'left') c.push(`right-full left-auto ${$style.popoverLeft}`)
104
+ if (position === 'top') c.push(`bottom-full ${$style['popover-top']}`)
105
+ if (position === 'bottom') c.push(`top-full bottom-0 ${$style['popover-bottom']}`)
106
+ if (position === 'right') c.push(`left-full ${$style['popover-right']}`)
107
+ if (position === 'left') c.push(`right-full left-auto ${$style['popover-left']}`)
108
108
 
109
109
  if (align === 'left' && ['bottom', 'top'].includes(position)) c.push('left-0 right-auto')
110
110
  if (align === 'center' && ['bottom', 'top'].includes(position)) c.push('left-1/2 right-auto -translate-x-1/2')
@@ -185,7 +185,7 @@ defineExpose({ open, close, toggle, isOpen })
185
185
  ref="contentRef"
186
186
  class="absolute transform transition-transform z-40 h-fit"
187
187
  :class="[
188
- $style.popoverContent,
188
+ $style['popover-content'],
189
189
  contentClasses,
190
190
  classes.content
191
191
  ]"
@@ -198,48 +198,52 @@ defineExpose({ open, close, toggle, isOpen })
198
198
 
199
199
  <style lang="postcss" module>
200
200
  .popover {
201
- .popoverContent {
201
+ .popover-content {
202
202
  visibility: hidden;
203
- transition-duration: .1s;
204
- transition-timing-function: cubic-bezier(.4,0,1,1);
203
+ transition-duration: 0.1s;
204
+ transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
205
205
  }
206
- .popoverTop {
206
+
207
+ .popover-top {
207
208
  --tw-translate-y: 0.5rem;
208
209
  }
209
- .popoverRight {
210
+
211
+ .popover-right {
210
212
  --tw-translate-x: -0.5rem;
211
213
  }
212
- .popoverBottom {
214
+
215
+ .popover-bottom {
213
216
  --tw-translate-y: -0.5rem;
214
217
  }
215
- .popoverLeft {
218
+
219
+ .popover-left {
216
220
  --tw-translate-x: 0.5rem;
217
221
  }
218
222
 
219
- &.hover:hover .popoverContent,
220
- &.is-open .popoverContent {
223
+ &.is-open .popover-content,
224
+ &.hover:hover .popover-content {
221
225
  visibility: visible;
222
- transition-duration: .15s;
223
- transition-timing-function: cubic-bezier(0,0,.2,1);
226
+ transition-duration: 0.15s;
227
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
224
228
  }
225
229
 
226
- &.hover:hover .popoverTop,
227
- &.is-open .popoverTop {
230
+ &.is-open .popover-top,
231
+ &.hover:hover .popover-top {
228
232
  --tw-translate-y: -0.25rem;
229
233
  }
230
234
 
231
- &.hover:hover .popoverRight,
232
- &.is-open .popoverRight {
235
+ &.is-open .popover-right,
236
+ &.hover:hover .popover-right {
233
237
  --tw-translate-x: 0.25rem;
234
238
  }
235
239
 
236
- &.hover:hover .popoverBottom,
237
- &.is-open .popoverBottom {
240
+ &.is-open .popover-bottom,
241
+ &.hover:hover .popover-bottom {
238
242
  --tw-translate-y: 0.25rem;
239
243
  }
240
244
 
241
- &.hover:hover .popoverLeft,
242
- &.is-open .popoverLeft {
245
+ &.is-open .popover-left,
246
+ &.hover:hover .popover-left {
243
247
  --tw-translate-x: -0.25rem;
244
248
  }
245
249
  }
@@ -128,10 +128,11 @@ defineExpose({ focus, blur, reset, validate, setError })
128
128
  }
129
129
 
130
130
  &--glow {
131
- box-shadow: 0 0 #000, 0 0 #000, 0 10px 15px -3px var(--x-radio-glow),0 4px 6px -4px var(--x-radio-glow);
131
+ box-shadow: 0 0 #000, 0 0 #000, 0 10px 15px -3px var(--x-radio-glow), 0 4px 6px -4px var(--x-radio-glow);
132
132
  }
133
133
 
134
- :global(.dark) &, &:global(.dark) {
134
+ :global(.dark) &,
135
+ &:global(.dark) {
135
136
  border-color: var(--x-radio-dark-border);
136
137
  background-color: var(--x-radio-dark-bg);
137
138
 
@@ -48,7 +48,7 @@ const { styles, classes, className } = useTheme('scroll', theme, props)
48
48
  :class="[
49
49
  className,
50
50
  classes.wrapper,
51
- $style.scrollWrap,
51
+ $style.scrollwrap,
52
52
  horizontal ? [
53
53
  $style.horizontal,
54
54
  {
@@ -70,7 +70,7 @@ const { styles, classes, className } = useTheme('scroll', theme, props)
70
70
  :class="[
71
71
  [horizontal ? 'overflow-x-auto' : 'overflow-y-auto'],
72
72
  {
73
- [$style.hideScroll]: !scrollbar,
73
+ [$style.hidescroll]: !scrollbar,
74
74
  }
75
75
  ]"
76
76
  >
@@ -80,60 +80,67 @@ const { styles, classes, className } = useTheme('scroll', theme, props)
80
80
  </template>
81
81
 
82
82
  <style lang="postcss" module>
83
- .scrollWrap {
84
- &:before, &:after {
83
+ .scrollwrap {
84
+ &::before,
85
+ &::after {
85
86
  content: "";
86
87
  pointer-events: none;
87
88
  position: absolute;
88
89
  z-index: 1;
89
- transition: box-shadow .2s;
90
+ transition: box-shadow 0.2s;
90
91
  }
91
92
 
92
- &.horizontal:before, &.horizontal:after {
93
+ &.horizontal::before,
94
+ &.horizontal::after {
93
95
  top: 0;
94
96
  bottom: 0;
95
97
  width: 20px;
96
98
  }
97
99
 
98
- &.vertical:before, &.vertical:after {
100
+ &.vertical::before,
101
+ &.vertical::after {
99
102
  right: 0;
100
103
  left: 0;
101
104
  height: 20px;
102
105
  }
103
106
 
104
- &.horizontal:before {
107
+ &.horizontal::before {
105
108
  left: 0;
106
109
  }
107
- &.horizontal:after {
110
+
111
+ &.horizontal::after {
108
112
  right: 0;
109
113
  }
110
- &.vertical:before {
114
+
115
+ &.vertical::before {
111
116
  top: 0;
112
117
  }
113
- &.vertical:after {
118
+
119
+ &.vertical::after {
114
120
  bottom: 0;
115
121
  }
116
122
 
117
- &.shadow-left:before {
123
+ &.shadow-left::before {
118
124
  box-shadow: inset 12px 0 10px -10px rgb(0 0 0 / 7%);
119
125
  }
120
126
 
121
- &.shadow-right:after {
127
+ &.shadow-right::after {
122
128
  box-shadow: inset -12px 0 10px -10px rgb(0 0 0 / 7%);
123
129
  }
124
130
 
125
- &.shadow-top:before {
131
+ &.shadow-top::before {
126
132
  box-shadow: inset 0 12px 10px -10px rgb(0 0 0 / 7%);
127
133
  }
128
134
 
129
- &.shadow-bottom:after {
135
+ &.shadow-bottom::after {
130
136
  box-shadow: inset 0 -12px 10px -10px rgb(0 0 0 / 7%);
131
137
  }
132
138
  }
133
139
 
134
- .hideScroll {
140
+ .hidescroll {
135
141
  -ms-overflow-style: auto;
136
142
  scrollbar-width: none;
143
+
137
144
  &::-webkit-scrollbar {
138
145
  display: none;
139
146
  }
@@ -22,9 +22,9 @@ import XInputError from '../helpers/InputError'
22
22
  import theme from './Select.theme'
23
23
 
24
24
  export type SelectOption = {
25
- value: number | string,
26
- disabled: boolean,
27
- label: string
25
+ value: number | string;
26
+ disabled: boolean;
27
+ label: string;
28
28
  }
29
29
 
30
30
  const props = defineProps({
@@ -321,7 +321,6 @@ defineExpose({ focus, blur, reset, validate, setError })
321
321
  :disabled="disabled || loading"
322
322
  :multiple="multiple"
323
323
  :readonly="readonly"
324
- :value="modelValue"
325
324
  v-on="inputListeners"
326
325
  >
327
326
  <option
@@ -16,12 +16,12 @@ import XSpinner from '../spinner/Spinner.vue'
16
16
  import theme from './Table.theme'
17
17
 
18
18
  export type Header = {
19
- sortable?: boolean
20
- sort?: string[]
21
- align?: Align
22
- value?: string
23
- text?: string
24
- width?: string | number
19
+ sortable?: boolean;
20
+ sort?: string[];
21
+ align?: Align;
22
+ value?: string;
23
+ text?: string;
24
+ width?: string | number;
25
25
  }
26
26
 
27
27
  const props = defineProps({
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  const validators = {
3
- textAlign: [null,'left','center','right','justify'],
4
- verticalAlign: [null,'baseline','bottom','middle','text-bottom','text-top','top'],
3
+ textAlign: [null, 'left', 'center', 'right', 'justify'],
4
+ verticalAlign: [null, 'baseline', 'bottom', 'middle', 'text-bottom', 'text-top', 'top'],
5
5
  }
6
6
 
7
7
  export default {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  const validators = {
3
- sort: [1,-1],
4
- textAlign: ['left','center','right','justify'],
3
+ sort: [1, -1],
4
+ textAlign: ['left', 'center', 'right', 'justify'],
5
5
  }
6
6
 
7
7
  export default { name: 'XTableHeader', validators }
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  const validators = {
3
- verticalAlign: ['baseline','bottom','middle','text-bottom','text-top','top'],
3
+ verticalAlign: ['baseline', 'bottom', 'middle', 'text-bottom', 'text-top', 'top'],
4
4
  }
5
5
 
6
6
  export default { name: 'XTableRow', validators }
File without changes
@@ -9,7 +9,7 @@ const hexToRGB = (hex: string) => hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i
9
9
  ?.map((x) => parseInt(x, 16))
10
10
 
11
11
  export const setOpacity = (color: string, opacity: number) => {
12
- const [r, g, b] = (isHex(color) ? hexToRGB(color) : parseRGB(color)) ?? [0,0,0]
12
+ const [r, g, b] = (isHex(color) ? hexToRGB(color) : parseRGB(color)) ?? [0, 0, 0]
13
13
 
14
14
  return 'rgba' + '(' + r + ',' + g + ',' + b + ',' + opacity + ')'
15
15
  }
@@ -22,7 +22,7 @@ export const colorShade = (color: string, percentage: number) => {
22
22
  const shade = lighten ? 0 : percentage * 255 ** 2
23
23
  const calcPrimary = (p: string | number) => Math.round((base * Math.floor(Number(p)) ** 2 + shade) ** 0.5)
24
24
 
25
- const [r, g, b, a] = (isHex(color) ? hexToRGB(color) : parseRGB(color)) ?? [0,0,0]
25
+ const [r, g, b, a] = (isHex(color) ? hexToRGB(color) : parseRGB(color)) ?? [0, 0, 0]
26
26
  const red = calcPrimary(r)
27
27
  const green = calcPrimary(g)
28
28
  const blue = calcPrimary(b)
@@ -110,269 +110,4 @@ export const indielayerColors = ['primary', 'secondary', 'success', 'warning', '
110
110
  // 'bg-success-900',
111
111
  // ])
112
112
 
113
- export const tailwindColors: ColorLibrary = Object.freeze({
114
- slate: {
115
- 50: '#f8fafc',
116
- 100: '#f1f5f9',
117
- 200: '#e2e8f0',
118
- 300: '#cbd5e1',
119
- 400: '#94a3b8',
120
- 500: '#64748b',
121
- 600: '#475569',
122
- 700: '#334155',
123
- 800: '#1e293b',
124
- 900: '#0f172a',
125
- },
126
- gray: {
127
- 50: '#f9fafb',
128
- 100: '#f3f4f6',
129
- 200: '#e5e7eb',
130
- 300: '#d1d5db',
131
- 400: '#9ca3af',
132
- 500: '#6b7280',
133
- 600: '#4b5563',
134
- 700: '#374151',
135
- 800: '#1f2937',
136
- 900: '#111827',
137
- },
138
- zinc: {
139
- 50: '#fafafa',
140
- 100: '#f4f4f5',
141
- 200: '#e4e4e7',
142
- 300: '#d4d4d8',
143
- 400: '#a1a1aa',
144
- 500: '#71717a',
145
- 600: '#52525b',
146
- 700: '#3f3f46',
147
- 800: '#27272a',
148
- 900: '#18181b',
149
- },
150
- neutral: {
151
- 50: '#fafafa',
152
- 100: '#f5f5f5',
153
- 200: '#e5e5e5',
154
- 300: '#d4d4d4',
155
- 400: '#a3a3a3',
156
- 500: '#737373',
157
- 600: '#525252',
158
- 700: '#404040',
159
- 800: '#262626',
160
- 900: '#171717',
161
- },
162
- stone: {
163
- 50: '#fafaf9',
164
- 100: '#f5f5f4',
165
- 200: '#e7e5e4',
166
- 300: '#d6d3d1',
167
- 400: '#a8a29e',
168
- 500: '#78716c',
169
- 600: '#57534e',
170
- 700: '#44403c',
171
- 800: '#292524',
172
- 900: '#1c1917',
173
- },
174
- red: {
175
- 50: '#fef2f2',
176
- 100: '#fee2e2',
177
- 200: '#fecaca',
178
- 300: '#fca5a5',
179
- 400: '#f87171',
180
- 500: '#ef4444',
181
- 600: '#dc2626',
182
- 700: '#b91c1c',
183
- 800: '#991b1b',
184
- 900: '#7f1d1d',
185
- },
186
- orange: {
187
- 50: '#fff7ed',
188
- 100: '#ffedd5',
189
- 200: '#fed7aa',
190
- 300: '#fdba74',
191
- 400: '#fb923c',
192
- 500: '#f97316',
193
- 600: '#ea580c',
194
- 700: '#c2410c',
195
- 800: '#9a3412',
196
- 900: '#7c2d12',
197
- },
198
- amber: {
199
- 50: '#fffbeb',
200
- 100: '#fef3c7',
201
- 200: '#fde68a',
202
- 300: '#fcd34d',
203
- 400: '#fbbf24',
204
- 500: '#f59e0b',
205
- 600: '#d97706',
206
- 700: '#b45309',
207
- 800: '#92400e',
208
- 900: '#78350f',
209
- },
210
- yellow: {
211
- 50: '#fefce8',
212
- 100: '#fef9c3',
213
- 200: '#fef08a',
214
- 300: '#fde047',
215
- 400: '#facc15',
216
- 500: '#eab308',
217
- 600: '#ca8a04',
218
- 700: '#a16207',
219
- 800: '#854d0e',
220
- 900: '#713f12',
221
- },
222
- lime: {
223
- 50: '#f7fee7',
224
- 100: '#ecfccb',
225
- 200: '#d9f99d',
226
- 300: '#bef264',
227
- 400: '#a3e635',
228
- 500: '#84cc16',
229
- 600: '#65a30d',
230
- 700: '#4d7c0f',
231
- 800: '#3f6212',
232
- 900: '#365314',
233
- },
234
- green: {
235
- 50: '#f0fdf4',
236
- 100: '#dcfce7',
237
- 200: '#bbf7d0',
238
- 300: '#86efac',
239
- 400: '#4ade80',
240
- 500: '#22c55e',
241
- 600: '#16a34a',
242
- 700: '#15803d',
243
- 800: '#166534',
244
- 900: '#14532d',
245
- },
246
- emerald: {
247
- 50: '#ecfdf5',
248
- 100: '#d1fae5',
249
- 200: '#a7f3d0',
250
- 300: '#6ee7b7',
251
- 400: '#34d399',
252
- 500: '#10b981',
253
- 600: '#059669',
254
- 700: '#047857',
255
- 800: '#065f46',
256
- 900: '#064e3b',
257
- },
258
- teal: {
259
- 50: '#f0fdfa',
260
- 100: '#ccfbf1',
261
- 200: '#99f6e4',
262
- 300: '#5eead4',
263
- 400: '#2dd4bf',
264
- 500: '#14b8a6',
265
- 600: '#0d9488',
266
- 700: '#0f766e',
267
- 800: '#115e59',
268
- 900: '#134e4a',
269
- },
270
- cyan: {
271
- 50: '#ecfeff',
272
- 100: '#cffafe',
273
- 200: '#a5f3fc',
274
- 300: '#67e8f9',
275
- 400: '#22d3ee',
276
- 500: '#06b6d4',
277
- 600: '#0891b2',
278
- 700: '#0e7490',
279
- 800: '#155e75',
280
- 900: '#164e63',
281
- },
282
- sky: {
283
- 50: '#f0f9ff',
284
- 100: '#e0f2fe',
285
- 200: '#bae6fd',
286
- 300: '#7dd3fc',
287
- 400: '#38bdf8',
288
- 500: '#0ea5e9',
289
- 600: '#0284c7',
290
- 700: '#0369a1',
291
- 800: '#075985',
292
- 900: '#0c4a6e',
293
- },
294
- blue: {
295
- 50: '#eff6ff',
296
- 100: '#dbeafe',
297
- 200: '#bfdbfe',
298
- 300: '#93c5fd',
299
- 400: '#60a5fa',
300
- 500: '#3b82f6',
301
- 600: '#2563eb',
302
- 700: '#1d4ed8',
303
- 800: '#1e40af',
304
- 900: '#1e3a8a',
305
- },
306
- indigo: {
307
- 50: '#eef2ff',
308
- 100: '#e0e7ff',
309
- 200: '#c7d2fe',
310
- 300: '#a5b4fc',
311
- 400: '#818cf8',
312
- 500: '#6366f1',
313
- 600: '#4f46e5',
314
- 700: '#4338ca',
315
- 800: '#3730a3',
316
- 900: '#312e81',
317
- },
318
- violet: {
319
- 50: '#f5f3ff',
320
- 100: '#ede9fe',
321
- 200: '#ddd6fe',
322
- 300: '#c4b5fd',
323
- 400: '#a78bfa',
324
- 500: '#8b5cf6',
325
- 600: '#7c3aed',
326
- 700: '#6d28d9',
327
- 800: '#5b21b6',
328
- 900: '#4c1d95',
329
- },
330
- purple: {
331
- 50: '#faf5ff',
332
- 100: '#f3e8ff',
333
- 200: '#e9d5ff',
334
- 300: '#d8b4fe',
335
- 400: '#c084fc',
336
- 500: '#a855f7',
337
- 600: '#9333ea',
338
- 700: '#7e22ce',
339
- 800: '#6b21a8',
340
- 900: '#581c87',
341
- },
342
- fuchsia: {
343
- 50: '#fdf4ff',
344
- 100: '#fae8ff',
345
- 200: '#f5d0fe',
346
- 300: '#f0abfc',
347
- 400: '#e879f9',
348
- 500: '#d946ef',
349
- 600: '#c026d3',
350
- 700: '#a21caf',
351
- 800: '#86198f',
352
- 900: '#701a75',
353
- },
354
- pink: {
355
- 50: '#fdf2f8',
356
- 100: '#fce7f3',
357
- 200: '#fbcfe8',
358
- 300: '#f9a8d4',
359
- 400: '#f472b6',
360
- 500: '#ec4899',
361
- 600: '#db2777',
362
- 700: '#be185d',
363
- 800: '#9d174d',
364
- 900: '#831843',
365
- },
366
- rose: {
367
- 50: '#fff1f2',
368
- 100: '#ffe4e6',
369
- 200: '#fecdd3',
370
- 300: '#fda4af',
371
- 400: '#fb7185',
372
- 500: '#f43f5e',
373
- 600: '#e11d48',
374
- 700: '#be123c',
375
- 800: '#9f1239',
376
- 900: '#881337',
377
- },
378
- })
113
+ export const tailwindColors: ColorLibrary = Object.freeze({ 'slate': { '50': '#f8fafc', '100': '#f1f5f9', '200': '#e2e8f0', '300': '#cbd5e1', '400': '#94a3b8', '500': '#64748b', '600': '#475569', '700': '#334155', '800': '#1e293b', '900': '#0f172a', '950': '#020617' }, 'gray': { '50': '#f9fafb', '100': '#f3f4f6', '200': '#e5e7eb', '300': '#d1d5db', '400': '#9ca3af', '500': '#6b7280', '600': '#4b5563', '700': '#374151', '800': '#1f2937', '900': '#111827', '950': '#030712' }, 'zinc': { '50': '#fafafa', '100': '#f4f4f5', '200': '#e4e4e7', '300': '#d4d4d8', '400': '#a1a1aa', '500': '#71717a', '600': '#52525b', '700': '#3f3f46', '800': '#27272a', '900': '#18181b', '950': '#09090b' }, 'neutral': { '50': '#fafafa', '100': '#f5f5f5', '200': '#e5e5e5', '300': '#d4d4d4', '400': '#a3a3a3', '500': '#737373', '600': '#525252', '700': '#404040', '800': '#262626', '900': '#171717', '950': '#0a0a0a' }, 'stone': { '50': '#fafaf9', '100': '#f5f5f4', '200': '#e7e5e4', '300': '#d6d3d1', '400': '#a8a29e', '500': '#78716c', '600': '#57534e', '700': '#44403c', '800': '#292524', '900': '#1c1917', '950': '#0c0a09' }, 'red': { '50': '#fef2f2', '100': '#fee2e2', '200': '#fecaca', '300': '#fca5a5', '400': '#f87171', '500': '#ef4444', '600': '#dc2626', '700': '#b91c1c', '800': '#991b1b', '900': '#7f1d1d', '950': '#450a0a' }, 'orange': { '50': '#fff7ed', '100': '#ffedd5', '200': '#fed7aa', '300': '#fdba74', '400': '#fb923c', '500': '#f97316', '600': '#ea580c', '700': '#c2410c', '800': '#9a3412', '900': '#7c2d12', '950': '#431407' }, 'amber': { '50': '#fffbeb', '100': '#fef3c7', '200': '#fde68a', '300': '#fcd34d', '400': '#fbbf24', '500': '#f59e0b', '600': '#d97706', '700': '#b45309', '800': '#92400e', '900': '#78350f', '950': '#451a03' }, 'yellow': { '50': '#fefce8', '100': '#fef9c3', '200': '#fef08a', '300': '#fde047', '400': '#facc15', '500': '#eab308', '600': '#ca8a04', '700': '#a16207', '800': '#854d0e', '900': '#713f12', '950': '#422006' }, 'lime': { '50': '#f7fee7', '100': '#ecfccb', '200': '#d9f99d', '300': '#bef264', '400': '#a3e635', '500': '#84cc16', '600': '#65a30d', '700': '#4d7c0f', '800': '#3f6212', '900': '#365314', '950': '#1a2e05' }, 'green': { '50': '#f0fdf4', '100': '#dcfce7', '200': '#bbf7d0', '300': '#86efac', '400': '#4ade80', '500': '#22c55e', '600': '#16a34a', '700': '#15803d', '800': '#166534', '900': '#14532d', '950': '#052e16' }, 'emerald': { '50': '#ecfdf5', '100': '#d1fae5', '200': '#a7f3d0', '300': '#6ee7b7', '400': '#34d399', '500': '#10b981', '600': '#059669', '700': '#047857', '800': '#065f46', '900': '#064e3b', '950': '#022c22' }, 'teal': { '50': '#f0fdfa', '100': '#ccfbf1', '200': '#99f6e4', '300': '#5eead4', '400': '#2dd4bf', '500': '#14b8a6', '600': '#0d9488', '700': '#0f766e', '800': '#115e59', '900': '#134e4a', '950': '#042f2e' }, 'cyan': { '50': '#ecfeff', '100': '#cffafe', '200': '#a5f3fc', '300': '#67e8f9', '400': '#22d3ee', '500': '#06b6d4', '600': '#0891b2', '700': '#0e7490', '800': '#155e75', '900': '#164e63', '950': '#083344' }, 'sky': { '50': '#f0f9ff', '100': '#e0f2fe', '200': '#bae6fd', '300': '#7dd3fc', '400': '#38bdf8', '500': '#0ea5e9', '600': '#0284c7', '700': '#0369a1', '800': '#075985', '900': '#0c4a6e', '950': '#082f49' }, 'blue': { '50': '#eff6ff', '100': '#dbeafe', '200': '#bfdbfe', '300': '#93c5fd', '400': '#60a5fa', '500': '#3b82f6', '600': '#2563eb', '700': '#1d4ed8', '800': '#1e40af', '900': '#1e3a8a', '950': '#172554' }, 'indigo': { '50': '#eef2ff', '100': '#e0e7ff', '200': '#c7d2fe', '300': '#a5b4fc', '400': '#818cf8', '500': '#6366f1', '600': '#4f46e5', '700': '#4338ca', '800': '#3730a3', '900': '#312e81', '950': '#1e1b4b' }, 'violet': { '50': '#f5f3ff', '100': '#ede9fe', '200': '#ddd6fe', '300': '#c4b5fd', '400': '#a78bfa', '500': '#8b5cf6', '600': '#7c3aed', '700': '#6d28d9', '800': '#5b21b6', '900': '#4c1d95', '950': '#2e1065' }, 'purple': { '50': '#faf5ff', '100': '#f3e8ff', '200': '#e9d5ff', '300': '#d8b4fe', '400': '#c084fc', '500': '#a855f7', '600': '#9333ea', '700': '#7e22ce', '800': '#6b21a8', '900': '#581c87', '950': '#3b0764' }, 'fuchsia': { '50': '#fdf4ff', '100': '#fae8ff', '200': '#f5d0fe', '300': '#f0abfc', '400': '#e879f9', '500': '#d946ef', '600': '#c026d3', '700': '#a21caf', '800': '#86198f', '900': '#701a75', '950': '#4a044e' }, 'pink': { '50': '#fdf2f8', '100': '#fce7f3', '200': '#fbcfe8', '300': '#f9a8d4', '400': '#f472b6', '500': '#ec4899', '600': '#db2777', '700': '#be185d', '800': '#9d174d', '900': '#831843', '950': '#500724' }, 'rose': { '50': '#fff1f2', '100': '#ffe4e6', '200': '#fecdd3', '300': '#fda4af', '400': '#fb7185', '500': '#f43f5e', '600': '#e11d48', '700': '#be123c', '800': '#9f1239', '900': '#881337', '950': '#4c0519' }, 'lightBlue': { '50': '#f0f9ff', '100': '#e0f2fe', '200': '#bae6fd', '300': '#7dd3fc', '400': '#38bdf8', '500': '#0ea5e9', '600': '#0284c7', '700': '#0369a1', '800': '#075985', '900': '#0c4a6e', '950': '#082f49' }, 'warmGray': { '50': '#fafaf9', '100': '#f5f5f4', '200': '#e7e5e4', '300': '#d6d3d1', '400': '#a8a29e', '500': '#78716c', '600': '#57534e', '700': '#44403c', '800': '#292524', '900': '#1c1917', '950': '#0c0a09' }, 'trueGray': { '50': '#fafafa', '100': '#f5f5f5', '200': '#e5e5e5', '300': '#d4d4d4', '400': '#a3a3a3', '500': '#737373', '600': '#525252', '700': '#404040', '800': '#262626', '900': '#171717', '950': '#0a0a0a' }, 'coolGray': { '50': '#f9fafb', '100': '#f3f4f6', '200': '#e5e7eb', '300': '#d1d5db', '400': '#9ca3af', '500': '#6b7280', '600': '#4b5563', '700': '#374151', '800': '#1f2937', '900': '#111827', '950': '#030712' }, 'blueGray': { '50': '#f8fafc', '100': '#f1f5f9', '200': '#e2e8f0', '300': '#cbd5e1', '400': '#94a3b8', '500': '#64748b', '600': '#475569', '700': '#334155', '800': '#1e293b', '900': '#0f172a', '950': '#020617' } })
@@ -3,30 +3,31 @@ import { computed, inject, unref } from 'vue'
3
3
  import { injectThemeKey } from './keys'
4
4
  import { isValidColor, tailwindColors, colorShade, setOpacity } from './colors-utils'
5
5
 
6
- export type Tone = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'
6
+ export type Tone = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | '950'
7
7
 
8
8
  export interface ColorPalette {
9
- 50: string
10
- 100: string
11
- 200: string
12
- 300: string
13
- 400: string
14
- 500: string
15
- 600: string
16
- 700: string
17
- 800: string
18
- 900: string
9
+ 50: string;
10
+ 100: string;
11
+ 200: string;
12
+ 300: string;
13
+ 400: string;
14
+ 500: string;
15
+ 600: string;
16
+ 700: string;
17
+ 800: string;
18
+ 900: string;
19
+ 950: string;
19
20
  }
20
21
 
21
22
  export type ColorLibrary = Record<string, ColorPalette>
22
23
 
23
24
  export interface ColorsProps {
24
- color?: string
25
+ color?: string;
25
26
  }
26
27
 
27
28
  export interface ColorComposition {
28
- getPalette: (color: string)=> ColorPalette
29
- getColorOpacity: (color: string, opacity: number)=> string
29
+ getPalette: (color: string) => ColorPalette;
30
+ getColorOpacity: (color: string, opacity: number) => string;
30
31
  }
31
32
 
32
33
  const colorCache: ColorLibrary = {}
@@ -73,6 +74,7 @@ export const useColors = (): ColorComposition => {
73
74
  700: colorShade(color, -0.25),
74
75
  800: colorShade(color, -0.58),
75
76
  900: colorShade(color, -0.7),
77
+ 950: colorShade(color, -0.8),
76
78
  }
77
79
 
78
80
  colorCache[color] = palette