@flux-ui/components 3.0.0-next.2 → 3.0.0-next.21

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 (143) hide show
  1. package/README.md +12 -40
  2. package/dist/component/FluxActions.vue.d.ts.map +1 -1
  3. package/dist/component/FluxDataTable.vue.d.ts +49 -17
  4. package/dist/component/FluxDataTable.vue.d.ts.map +1 -1
  5. package/dist/component/FluxDatePicker.vue.d.ts.map +1 -1
  6. package/dist/component/FluxFilter.vue.d.ts.map +1 -1
  7. package/dist/component/FluxFlyout.vue.d.ts.map +1 -1
  8. package/dist/component/FluxFormDateInput.vue.d.ts.map +1 -1
  9. package/dist/component/FluxFormDateRangeInput.vue.d.ts.map +1 -1
  10. package/dist/component/FluxFormDateTimeInput.vue.d.ts.map +1 -1
  11. package/dist/component/FluxFormInput.vue.d.ts +1 -0
  12. package/dist/component/FluxFormInput.vue.d.ts.map +1 -1
  13. package/dist/component/FluxFormInputGroup.vue.d.ts +1 -0
  14. package/dist/component/FluxFormInputGroup.vue.d.ts.map +1 -1
  15. package/dist/component/FluxFormTimeZonePicker.vue.d.ts.map +1 -1
  16. package/dist/component/FluxMenuItem.vue.d.ts.map +1 -1
  17. package/dist/component/FluxOverlayProvider.vue.d.ts +3 -0
  18. package/dist/component/FluxOverlayProvider.vue.d.ts.map +1 -0
  19. package/dist/component/FluxPagination.vue.d.ts +1 -1
  20. package/dist/component/FluxPagination.vue.d.ts.map +1 -1
  21. package/dist/component/FluxPaginationBar.vue.d.ts +1 -1
  22. package/dist/component/FluxPaginationBar.vue.d.ts.map +1 -1
  23. package/dist/component/FluxPaginationButton.vue.d.ts +30 -0
  24. package/dist/component/FluxPaginationButton.vue.d.ts.map +1 -0
  25. package/dist/component/FluxPrompt.vue.d.ts +2 -0
  26. package/dist/component/FluxPrompt.vue.d.ts.map +1 -1
  27. package/dist/component/FluxRoot.vue.d.ts.map +1 -1
  28. package/dist/component/FluxStatistic.vue.d.ts +3 -1
  29. package/dist/component/FluxStatistic.vue.d.ts.map +1 -1
  30. package/dist/component/FluxTabBar.vue.d.ts.map +1 -1
  31. package/dist/component/FluxTabBarItem.vue.d.ts.map +1 -1
  32. package/dist/component/FluxTable.vue.d.ts +14 -8
  33. package/dist/component/FluxTable.vue.d.ts.map +1 -1
  34. package/dist/component/FluxTooltip.vue.d.ts.map +1 -1
  35. package/dist/component/FluxTooltipProvider.vue.d.ts.map +1 -1
  36. package/dist/component/index.d.ts +1 -0
  37. package/dist/component/index.d.ts.map +1 -1
  38. package/dist/component/primitive/AnchorPopup.vue.d.ts.map +1 -1
  39. package/dist/component/primitive/SelectBase.vue.d.ts +2 -0
  40. package/dist/component/primitive/SelectBase.vue.d.ts.map +1 -1
  41. package/dist/composable/index.d.ts +1 -0
  42. package/dist/composable/index.d.ts.map +1 -1
  43. package/dist/composable/private/useFormSelect.d.ts +2 -2
  44. package/dist/composable/private/useFormSelect.d.ts.map +1 -1
  45. package/dist/composable/useFlyoutInjection.d.ts +1 -5
  46. package/dist/composable/useFlyoutInjection.d.ts.map +1 -1
  47. package/dist/composable/useTableInjection.d.ts +1 -6
  48. package/dist/composable/useTableInjection.d.ts.map +1 -1
  49. package/dist/composable/useTooltipInjection.d.ts +2 -0
  50. package/dist/composable/useTooltipInjection.d.ts.map +1 -0
  51. package/dist/data/di.d.ts +4 -0
  52. package/dist/data/di.d.ts.map +1 -1
  53. package/dist/data/i18n.d.ts +1 -1
  54. package/dist/data/store.d.ts +2 -2
  55. package/dist/data/store.d.ts.map +1 -1
  56. package/dist/index.css +5814 -0
  57. package/dist/index.d.ts +1 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +14686 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/util/createDialogRenderer.d.ts +1 -1
  62. package/dist/util/createDialogRenderer.d.ts.map +1 -1
  63. package/package.json +21 -22
  64. package/src/component/FluxDataTable.vue +68 -16
  65. package/src/component/FluxDatePicker.vue +5 -1
  66. package/src/component/FluxFlyout.vue +2 -1
  67. package/src/component/FluxFormInput.vue +3 -1
  68. package/src/component/FluxFormInputGroup.vue +2 -0
  69. package/src/component/FluxFormSelect.vue +1 -1
  70. package/src/component/FluxFormTimeZonePicker.vue +5 -0
  71. package/src/component/FluxGallery.vue +2 -2
  72. package/src/component/FluxMenuItem.vue +1 -0
  73. package/src/component/FluxOverlayProvider.vue +39 -0
  74. package/src/component/FluxPagination.vue +16 -14
  75. package/src/component/FluxPaginationBar.vue +27 -38
  76. package/src/component/FluxPaginationButton.vue +39 -0
  77. package/src/component/FluxProgressBar.vue +1 -1
  78. package/src/component/FluxRoot.vue +3 -26
  79. package/src/component/FluxStatistic.vue +13 -2
  80. package/src/component/FluxTabBar.vue +21 -16
  81. package/src/component/FluxTable.vue +25 -4
  82. package/src/component/FluxTooltip.vue +2 -0
  83. package/src/component/FluxTooltipProvider.vue +7 -3
  84. package/src/component/index.ts +1 -0
  85. package/src/component/primitive/AnchorPopup.vue +5 -3
  86. package/src/composable/index.ts +1 -0
  87. package/src/composable/private/useFormSelect.ts +2 -2
  88. package/src/composable/useTooltipInjection.ts +8 -0
  89. package/src/css/base.scss +6 -3
  90. package/src/css/component/Action.module.scss +14 -14
  91. package/src/css/component/Avatar.module.scss +14 -14
  92. package/src/css/component/Badge.module.scss +14 -14
  93. package/src/css/component/Button.module.scss +39 -54
  94. package/src/css/component/Calendar.module.scss +12 -16
  95. package/src/css/component/Chip.module.scss +9 -19
  96. package/src/css/component/Color.module.scss +4 -4
  97. package/src/css/component/Comment.module.scss +15 -14
  98. package/src/css/component/DatePicker.module.scss +12 -23
  99. package/src/css/component/Divider.module.scss +2 -2
  100. package/src/css/component/DropZone.module.scss +27 -24
  101. package/src/css/component/Expandable.module.scss +9 -11
  102. package/src/css/component/Filter.module.scss +3 -5
  103. package/src/css/component/Form.module.scss +68 -49
  104. package/src/css/component/Gallery.module.scss +14 -6
  105. package/src/css/component/Icon.module.scss +76 -79
  106. package/src/css/component/Info.module.scss +1 -1
  107. package/src/css/component/Layout.module.scss +41 -45
  108. package/src/css/component/Legend.module.scss +2 -4
  109. package/src/css/component/Menu.module.scss +28 -49
  110. package/src/css/component/Notice.module.scss +45 -47
  111. package/src/css/component/Overlay.module.scss +56 -4
  112. package/src/css/component/Pagination.module.scss +70 -33
  113. package/src/css/component/Pane.module.scss +62 -67
  114. package/src/css/component/Placeholder.module.scss +4 -4
  115. package/src/css/component/Progress.module.scss +18 -9
  116. package/src/css/component/Remove.module.scss +4 -4
  117. package/src/css/component/SegmentedControl.module.scss +6 -6
  118. package/src/css/component/Snackbar.module.scss +20 -17
  119. package/src/css/component/Spinner.module.scss +2 -2
  120. package/src/css/component/Statistic.module.scss +25 -17
  121. package/src/css/component/Stepper.module.scss +12 -14
  122. package/src/css/component/Tab.module.scss +8 -7
  123. package/src/css/component/Table.module.scss +79 -29
  124. package/src/css/component/Timeline.module.scss +14 -18
  125. package/src/css/component/Toolbar.module.scss +9 -7
  126. package/src/css/component/Tooltip.module.scss +3 -2
  127. package/src/css/component/Transition.module.scss +1 -1
  128. package/src/css/component/Visual.module.scss +3 -3
  129. package/src/css/component/base/Pane.module.scss +25 -31
  130. package/src/css/component/primitive/CoordinatePicker.module.scss +3 -5
  131. package/src/css/component/primitive/Slider.module.scss +9 -14
  132. package/src/css/mixin/focus-ring.scss +2 -2
  133. package/src/css/typography.scss +3 -3
  134. package/src/css/variables.scss +178 -183
  135. package/src/data/di.ts +5 -0
  136. package/src/data/i18n.ts +1 -1
  137. package/src/data/iconRegistry.ts +1 -1
  138. package/src/data/store.ts +6 -4
  139. package/src/index.ts +1 -0
  140. package/src/util/createDialogRenderer.ts +33 -18
  141. package/dist/flux.css +0 -1
  142. package/dist/flux.js +0 -11402
  143. package/dist/flux.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  @mixin focus-outline {
2
- outline: 2px solid rgb(var(--primary-7) / 0);
2
+ outline: 2px solid oklch(from var(--primary-7) l c h / 0);
3
3
  outline-offset: 0;
4
4
  }
5
5
 
6
6
  @mixin focus-outline-visible($offset: 0) {
7
- outline-color: rgb(var(--primary-7));
7
+ outline-color: var(--primary-7);
8
8
  outline-offset: $offset;
9
9
  }
10
10
 
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  a:not([class]), a[class=""] {
36
- color: rgb(var(--primary-7));
36
+ color: var(--primary-7);
37
37
  text-decoration: underline;
38
38
  text-decoration-thickness: 1px;
39
39
  text-underline-offset: 4px;
@@ -51,7 +51,7 @@
51
51
  position: relative;
52
52
  margin: 0 0 0 30px;
53
53
  padding: 15px 21px;
54
- background: rgb(var(--gray-2));
54
+ background: var(--gray-2);
55
55
  border-radius: var(--radius);
56
56
 
57
57
  &::before {
@@ -59,7 +59,7 @@
59
59
  top: 5px;
60
60
  left: -27px;
61
61
  content: '”';
62
- color: rgb(var(--primary-7));
62
+ color: var(--primary-7);
63
63
  font-size: 39px;
64
64
  font-weight: 700;
65
65
  }
@@ -1,9 +1,5 @@
1
1
  @use 'sass:color';
2
2
 
3
- @function -rgb($hex) {
4
- @return color.channel($hex, 'red', $space: rgb) color.channel($hex, 'green', $space: rgb) color.channel($hex, 'blue', $space: rgb);
5
- }
6
-
7
3
  @mixin animation {
8
4
  --acceleration-curve: cubic-bezier(0.4, 0, 1, 1);
9
5
  --deceleration-curve: cubic-bezier(0, 0, 0.2, 1);
@@ -12,203 +8,202 @@
12
8
  }
13
9
 
14
10
  @mixin color-light {
15
- --primary-0: #{-rgb(#ffffff)};
16
- --primary-1: #{-rgb(#f5f8ff)};
17
- --primary-2: #{-rgb(#eff4ff)};
18
- --primary-3: #{-rgb(#d1e0ff)};
19
- --primary-4: #{-rgb(#b2ccff)};
20
- --primary-5: #{-rgb(#84adff)};
21
- --primary-6: #{-rgb(#528bff)};
22
- --primary-7: #{-rgb(#2970ff)};
23
- --primary-8: #{-rgb(#155eef)};
24
- --primary-9: #{-rgb(#004eeb)};
25
- --primary-10: #{-rgb(#0040c1)};
26
- --primary-11: #{-rgb(#00359e)};
27
-
28
- --danger-0: #{-rgb(#ffffff)};
29
- --danger-1: #{-rgb(#fff1f2)};
30
- --danger-2: #{-rgb(#ffe4e6)};
31
- --danger-3: #{-rgb(#ffccd3)};
32
- --danger-4: #{-rgb(#ffa1ad)};
33
- --danger-5: #{-rgb(#ff637e)};
34
- --danger-6: #{-rgb(#ff2056)};
35
- --danger-7: #{-rgb(#ec003f)};
36
- --danger-8: #{-rgb(#c70036)};
37
- --danger-9: #{-rgb(#a50036)};
38
- --danger-10: #{-rgb(#8b0836)};
39
- --danger-11: #{-rgb(#4d0218)};
40
-
41
- --info-0: #{-rgb(#ffffff)};
42
- --info-1: #{-rgb(#eff6ff)};
43
- --info-2: #{-rgb(#dbeafe)};
44
- --info-3: #{-rgb(#bedbff)};
45
- --info-4: #{-rgb(#8ec5ff)};
46
- --info-5: #{-rgb(#51a2ff)};
47
- --info-6: #{-rgb(#2b7fff)};
48
- --info-7: #{-rgb(#155dfc)};
49
- --info-8: #{-rgb(#1447e6)};
50
- --info-9: #{-rgb(#193cb8)};
51
- --info-10: #{-rgb(#1c398e)};
52
- --info-11: #{-rgb(#162456)};
53
-
54
- --success-0: #{-rgb(#ffffff)};
55
- --success-1: #{-rgb(#f0fdf4)};
56
- --success-2: #{-rgb(#dcfce7)};
57
- --success-3: #{-rgb(#b9f8cf)};
58
- --success-4: #{-rgb(#7bf1a8)};
59
- --success-5: #{-rgb(#05df72)};
60
- --success-6: #{-rgb(#00c950)};
61
- --success-7: #{-rgb(#00a63e)};
62
- --success-8: #{-rgb(#008236)};
63
- --success-9: #{-rgb(#016630)};
64
- --success-10: #{-rgb(#0d542b)};
65
- --success-11: #{-rgb(#032e15)};
66
-
67
- --warning-0: #{-rgb(#ffffff)};
68
- --warning-1: #{-rgb(#fffbeb)};
69
- --warning-2: #{-rgb(#fef3c6)};
70
- --warning-3: #{-rgb(#fee685)};
71
- --warning-4: #{-rgb(#ffd230)};
72
- --warning-5: #{-rgb(#ffb900)};
73
- --warning-6: #{-rgb(#fe9a00)};
74
- --warning-7: #{-rgb(#e17100)};
75
- --warning-8: #{-rgb(#bb4d00)};
76
- --warning-9: #{-rgb(#973c00)};
77
- --warning-10: #{-rgb(#7b3306)};
78
- --warning-11: #{-rgb(#461901)};
79
-
80
- --gray-0: #{-rgb(#ffffff)};
81
- --gray-1: #{-rgb(#f8fafc)};
82
- --gray-2: #{-rgb(#f1f5f9)};
83
- --gray-3: #{-rgb(#e2e8f0)};
84
- --gray-4: #{-rgb(#cad5e2)};
85
- --gray-5: #{-rgb(#90a1b9)};
86
- --gray-6: #{-rgb(#62748e)};
87
- --gray-7: #{-rgb(#45556c)};
88
- --gray-8: #{-rgb(#314158)};
89
- --gray-9: #{-rgb(#1d293d)};
90
- --gray-10: #{-rgb(#0f172b)};
91
- --gray-11: #{-rgb(#020618)};
11
+ --gray-0: oklch(100% 0 270);
12
+ --gray-1: oklch(98% 0.005 270);
13
+ --gray-2: oklch(95% 0.008 270);
14
+ --gray-3: oklch(91% 0.012 270);
15
+ --gray-4: oklch(84% 0.015 270);
16
+ --gray-5: oklch(72% 0.03 270);
17
+ --gray-6: oklch(64% 0.035 270);
18
+ --gray-7: oklch(52% 0.04 270);
19
+ --gray-8: oklch(40% 0.04 270);
20
+ --gray-9: oklch(32% 0.028 270);
21
+ --gray-10: oklch(24% 0.028 270);
22
+ --gray-11: oklch(16% 0.028 270);
23
+
24
+ --primary-0: oklch(99% 0 264);
25
+ --primary-1: oklch(96% 0.02 264);
26
+ --primary-2: oklch(92% 0.04 264);
27
+ --primary-3: oklch(88% 0.06 264);
28
+ --primary-4: oklch(80% 0.10 264);
29
+ --primary-5: oklch(72% 0.14 264);
30
+ --primary-6: oklch(64% 0.18 264);
31
+ --primary-7: oklch(52% 0.22 264);
32
+ --primary-8: oklch(40% 0.20 264);
33
+ --primary-9: oklch(32% 0.18 264);
34
+ --primary-10: oklch(24% 0.14 264);
35
+ --primary-11: oklch(16% 0.10 264);
36
+
37
+ --danger-0: oklch(99% 0.004 25);
38
+ --danger-1: oklch(96.9% 0.015 12);
39
+ --danger-2: oklch(94.1% 0.03 13);
40
+ --danger-3: oklch(89.2% 0.058 9);
41
+ --danger-4: oklch(80.6% 0.112 12);
42
+ --danger-5: oklch(70.6% 0.19 13);
43
+ --danger-6: oklch(64.3% 0.245 17);
44
+ --danger-7: oklch(59.7% 0.24 20);
45
+ --danger-8: oklch(52.5% 0.211 19);
46
+ --danger-9: oklch(45.9% 0.184 15);
47
+ --danger-10: oklch(41.1% 0.159 10);
48
+ --danger-11: oklch(27% 0.105 12);
49
+
50
+ --info-0: oklch(99% 0.005 235);
51
+ --info-1: oklch(97% 0.014 255);
52
+ --info-2: oklch(93.2% 0.032 256);
53
+ --info-3: oklch(88.2% 0.059 254);
54
+ --info-4: oklch(80.7% 0.101 250);
55
+ --info-5: oklch(70.4% 0.158 254);
56
+ --info-6: oklch(61.9% 0.207 259);
57
+ --info-7: oklch(54.7% 0.246 263);
58
+ --info-8: oklch(48.8% 0.243 264);
59
+ --info-9: oklch(42.4% 0.198 265);
60
+ --info-10: oklch(38% 0.145 265);
61
+ --info-11: oklch(28.1% 0.092 268);
62
+
63
+ --success-0: oklch(99% 0.005 145);
64
+ --success-1: oklch(98.2% 0.018 156);
65
+ --success-2: oklch(96.2% 0.043 157);
66
+ --success-3: oklch(92.6% 0.084 156);
67
+ --success-4: oklch(87% 0.149 155);
68
+ --success-5: oklch(79.1% 0.209 152);
69
+ --success-6: oklch(72.9% 0.212 148);
70
+ --success-7: oklch(63.2% 0.186 147);
71
+ --success-8: oklch(53% 0.149 149);
72
+ --success-9: oklch(44.7% 0.119 151);
73
+ --success-10: oklch(39.3% 0.096 152);
74
+ --success-11: oklch(26.5% 0.065 153);
75
+
76
+ --warning-0: oklch(99% 0.005 85);
77
+ --warning-1: oklch(98.7% 0.021 95);
78
+ --warning-2: oklch(96.2% 0.059 96);
79
+ --warning-3: oklch(92.4% 0.12 96);
80
+ --warning-4: oklch(87.8% 0.169 92);
81
+ --warning-5: oklch(82.9% 0.171 81);
82
+ --warning-6: oklch(77.2% 0.173 62);
83
+ --warning-7: oklch(66.7% 0.169 60);
84
+ --warning-8: oklch(55.7% 0.158 58);
85
+ --warning-9: oklch(47.5% 0.136 56);
86
+ --warning-10: oklch(41.5% 0.113 54);
87
+ --warning-11: oklch(27.9% 0.077 52);
92
88
  }
93
89
 
94
90
  @mixin color-dark {
95
- //--primary-0: #{-rgb(#182035)};
96
- //--primary-1: #{-rgb(#1f2a45)};
97
- //--primary-2: #{-rgb(#243254)};
98
- //--primary-3: #{-rgb(#2b3c63)};
99
- //--primary-4: #{-rgb(#314471)};
100
- //--primary-5: #{-rgb(#385080)};
101
- //--primary-6: #{-rgb(#3e5a8e)};
102
- //--primary-7: #{-rgb(#44669e)};
103
- //--primary-8: #{-rgb(#5077b0)};
104
- //--primary-9: #{-rgb(#5a84bf)};
105
- //--primary-10: #{-rgb(#6594d1)};
106
- //--primary-11: #{-rgb(#709fe3)};
107
-
108
- --danger-0: #{-rgb(#272325)};
109
- --danger-1: #{-rgb(#331e23)};
110
- --danger-2: #{-rgb(#3e1f28)};
111
- --danger-3: #{-rgb(#4c222e)};
112
- --danger-4: #{-rgb(#5b2635)};
113
- --danger-5: #{-rgb(#6a2b3e)};
114
- --danger-6: #{-rgb(#7a3047)};
115
- --danger-7: #{-rgb(#8b3552)};
116
- --danger-8: #{-rgb(#9e3a5f)};
117
- --danger-9: #{-rgb(#a53d6e)};
118
- --danger-10: #{-rgb(#b63e7c)};
119
- --danger-11: #{-rgb(#c8408c)};
120
-
121
- --info-0: #{-rgb(#23262c)};
122
- --info-1: #{-rgb(#1f2832)};
123
- --info-2: #{-rgb(#243141)};
124
- --info-3: #{-rgb(#2a3d52)};
125
- --info-4: #{-rgb(#2f4a66)};
126
- --info-5: #{-rgb(#34567b)};
127
- --info-6: #{-rgb(#3b638f)};
128
- --info-7: #{-rgb(#436fa3)};
129
- --info-8: #{-rgb(#4b7bb7)};
130
- --info-9: #{-rgb(#5588cb)};
131
- --info-10: #{-rgb(#6094df)};
132
- --info-11: #{-rgb(#6aa3f3)};
133
-
134
- --success-0: #{-rgb(#1d2620)};
135
- --success-1: #{-rgb(#222d26)};
136
- --success-2: #{-rgb(#26342c)};
137
- --success-3: #{-rgb(#2c4435)};
138
- --success-4: #{-rgb(#33543e)};
139
- --success-5: #{-rgb(#3a6547)};
140
- --success-6: #{-rgb(#417651)};
141
- --success-7: #{-rgb(#4b875d)};
142
- --success-8: #{-rgb(#589967)};
143
- --success-9: #{-rgb(#6eac74)};
144
- --success-10: #{-rgb(#86ba86)};
145
- --success-11: #{-rgb(#9bc89b)};
146
-
147
- --warning-0: #{-rgb(#2b261a)};
148
- --warning-1: #{-rgb(#332b1b)};
149
- --warning-2: #{-rgb(#3d321e)};
150
- --warning-3: #{-rgb(#4a3c21)};
151
- --warning-4: #{-rgb(#554825)};
152
- --warning-5: #{-rgb(#63552a)};
153
- --warning-6: #{-rgb(#74602f)};
154
- --warning-7: #{-rgb(#8a6c34)};
155
- --warning-8: #{-rgb(#a37b3a)};
156
- --warning-9: #{-rgb(#c19041)};
157
- --warning-10: #{-rgb(#d5a048)};
158
- --warning-11: #{-rgb(#eab14f)};
159
-
160
- --gray-0: #{-rgb(#14161a)};
161
- --gray-1: #{-rgb(#1b1d21)};
162
- --gray-2: #{-rgb(#22252b)};
163
- --gray-3: #{-rgb(#2a2d33)};
164
- --gray-4: #{-rgb(#333b3d)};
165
- --gray-5: #{-rgb(#3d464a)};
166
- --gray-6: #{-rgb(#475055)};
167
- --gray-7: #{-rgb(#515d60)};
168
- --gray-8: #{-rgb(#5c696b)};
169
- --gray-9: #{-rgb(#677577)};
170
- --gray-10: #{-rgb(#738180)};
171
- --gray-11: #{-rgb(#7f8c8c)};
91
+ --gray-0: oklch(16% 0.01 270);
92
+ --gray-1: oklch(19% 0.012 270);
93
+ --gray-2: oklch(23% 0.015 270);
94
+ --gray-3: oklch(27% 0.017 270);
95
+ --gray-4: oklch(35% 0.02 270);
96
+ --gray-5: oklch(43% 0.03 270);
97
+ --gray-6: oklch(51% 0.035 270);
98
+ --gray-7: oklch(63% 0.04 270);
99
+ --gray-8: oklch(75% 0.04 270);
100
+ --gray-9: oklch(83% 0.028 270);
101
+ --gray-10: oklch(91% 0.028 270);
102
+ --gray-11: oklch(99% 0.028 270);
103
+
104
+ --primary-0: oklch(26.8% 0.012 264);
105
+ --primary-1: oklch(29.3% 0.025 264);
106
+ --primary-2: oklch(32.4% 0.038 264);
107
+ --primary-3: oklch(36.4% 0.052 264);
108
+ --primary-4: oklch(40.6% 0.068 264);
109
+ --primary-5: oklch(45.3% 0.085 264);
110
+ --primary-6: oklch(49.8% 0.102 264);
111
+ --primary-7: oklch(54.9% 0.118 264);
112
+ --primary-8: oklch(60.9% 0.134 264);
113
+ --primary-9: oklch(68.5% 0.148 264);
114
+ --primary-10: oklch(73.9% 0.158 264);
115
+ --primary-11: oklch(79.5% 0.165 264);
116
+
117
+ --danger-0: oklch(26.1% 0.007 346);
118
+ --danger-1: oklch(29.3% 0.025 4);
119
+ --danger-2: oklch(32.4% 0.038 8);
120
+ --danger-3: oklch(36.4% 0.052 12);
121
+ --danger-4: oklch(40.6% 0.068 15);
122
+ --danger-5: oklch(45.3% 0.085 17);
123
+ --danger-6: oklch(49.8% 0.102 18);
124
+ --danger-7: oklch(54.9% 0.118 19);
125
+ --danger-8: oklch(60.9% 0.134 18);
126
+ --danger-9: oklch(68.5% 0.148 16);
127
+ --danger-10: oklch(73.9% 0.158 14);
128
+ --danger-11: oklch(79.5% 0.165 12);
129
+
130
+ --info-0: oklch(26.8% 0.012 264);
131
+ --info-1: oklch(29.3% 0.025 260);
132
+ --info-2: oklch(32.4% 0.038 258);
133
+ --info-3: oklch(36.4% 0.052 256);
134
+ --info-4: oklch(40.6% 0.068 254);
135
+ --info-5: oklch(45.3% 0.085 253);
136
+ --info-6: oklch(49.8% 0.102 252);
137
+ --info-7: oklch(54.9% 0.118 252);
138
+ --info-8: oklch(60.9% 0.134 253);
139
+ --info-9: oklch(68.5% 0.148 254);
140
+ --info-10: oklch(73.9% 0.158 254);
141
+ --info-11: oklch(79.5% 0.165 254);
142
+
143
+ --success-0: oklch(25.8% 0.017 156);
144
+ --success-1: oklch(29.3% 0.025 155);
145
+ --success-2: oklch(32.4% 0.038 155);
146
+ --success-3: oklch(36.4% 0.052 155);
147
+ --success-4: oklch(40.6% 0.068 154);
148
+ --success-5: oklch(45.3% 0.085 153);
149
+ --success-6: oklch(49.8% 0.102 152);
150
+ --success-7: oklch(54.9% 0.118 151);
151
+ --success-8: oklch(60.9% 0.134 150);
152
+ --success-9: oklch(68.5% 0.148 149);
153
+ --success-10: oklch(73.9% 0.158 148);
154
+ --success-11: oklch(79.5% 0.165 147);
155
+
156
+ --warning-0: oklch(27% 0.022 88);
157
+ --warning-1: oklch(29.3% 0.029 87);
158
+ --warning-2: oklch(32.4% 0.036 86);
159
+ --warning-3: oklch(36.4% 0.046 85);
160
+ --warning-4: oklch(40.6% 0.054 84);
161
+ --warning-5: oklch(45.3% 0.064 82);
162
+ --warning-6: oklch(49.8% 0.072 80);
163
+ --warning-7: oklch(54.9% 0.083 78);
164
+ --warning-8: oklch(60.9% 0.096 76);
165
+ --warning-9: oklch(68.5% 0.112 75);
166
+ --warning-10: oklch(73.9% 0.122 74);
167
+ --warning-11: oklch(79.5% 0.132 73);
172
168
  }
173
169
 
174
- @mixin default-light {
170
+ @mixin defaults {
175
171
  --font-monospace: jetbrains-mono, monospace;
176
172
  --font-sans: inter-variable, sans-serif;
177
173
  --font-serif: serif;
178
174
  --font-size: 15px;
179
175
  --radius: 9px;
180
176
 
181
- --background: rgb(var(--gray-2));
177
+ --background: var(--gray-2);
178
+ --foreground: var(--gray-8);
179
+ --foreground-prominent: var(--gray-10);
180
+ --foreground-secondary: var(--gray-5);
182
181
 
183
- --foreground: rgb(var(--gray-8));
184
- --foreground-prominent: rgb(var(--gray-10));
185
- --foreground-secondary: rgb(var(--gray-5));
182
+ --overlay: oklch(from var(--gray-11) l c h / .6);
183
+ --overlay-secondary: oklch(from var(--gray-11) l c h / .4);
186
184
  }
187
185
 
188
- @mixin default-dark {
189
- --background: rgb(var(--gray-2));
190
-
191
- --foreground: #cbd5e1;
192
- --foreground-prominent: #ffffff;
193
- --foreground-secondary: #64748b;
186
+ @mixin defaults-dark {
187
+ --overlay: rgb(0 0 0 / .6);
188
+ --overlay-secondary: rgb(0 0 0 / .4);
194
189
  }
195
190
 
196
191
  @mixin shadow-light {
197
- --shadow-px: 0 1px 1px rgb(29 41 61 / .025);
198
- --shadow-xs: 0 1px 2px 0 rgb(29 41 61 / .025);
199
- --shadow-sm: 0 1px 3px rgb(29 41 61 / .05), 0 1px 2px -1px rgb(29 41 61 / .05);
200
- --shadow-md: 0 4px 6px -1px rgb(29 41 61 / .05), 0 2px 4px -2px rgb(29 41 61 / .05);
201
- --shadow-lg: 0 10px 15px -3px rgb(29 41 61 / .05), 0 4px 6px -4px rgb(29 41 61 / .05);
202
- --shadow-xl: 0 20px 25px -5px rgb(29 41 61 / .05), 0 8px 10px -6px rgb(29 41 61 / .05);
203
- --shadow-2xl: 0 25px 50px -12px rgb(29 41 61 / .125);
192
+ --shadow-px: 0 1px 1px oklch(from var(--gray-9) l c h / 0.02);
193
+ --shadow-xs: 0 1px 2px 0 oklch(from var(--gray-9) l c h / 0.02);
194
+ --shadow-sm: 0 1px 3px oklch(from var(--gray-9) l c h / 0.05), 0 1px 2px -1px oklch(from var(--gray-9) l c h / 0.05);
195
+ --shadow-md: 0 4px 6px -1px oklch(from var(--gray-9) l c h / 0.05), 0 2px 4px -2px oklch(from var(--gray-9) l c h / 0.05);
196
+ --shadow-lg: 0 10px 15px -3px oklch(from var(--gray-9) l c h / 0.05), 0 4px 6px -4px oklch(from var(--gray-9) l c h / 0.05);
197
+ --shadow-xl: 0 20px 25px -5px oklch(from var(--gray-9) l c h / 0.05), 0 8px 10px -6px oklch(from var(--gray-9) l c h / 0.05);
198
+ --shadow-2xl: 0 25px 50px -12px oklch(from var(--gray-9) l c h / 0.12);
204
199
  }
205
200
 
206
201
  @mixin shadow-dark {
207
- --shadow-px: 0 1px 1px rgb(0 0 0 / .05);
208
- --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
209
- --shadow-sm: 0 1px 3px rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
210
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
211
- --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
212
- --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
213
- --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25);
202
+ --shadow-px: 0 1px 1px oklch(0 0 0 / 0.1);
203
+ --shadow-xs: 0 1px 2px 0 oklch(0 0 0 / 0.1);
204
+ --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.15), 0 1px 2px -1px oklch(0 0 0 / 0.15);
205
+ --shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.15), 0 2px 4px -2px oklch(0 0 0 / 0.15);
206
+ --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.15), 0 4px 6px -4px oklch(0 0 0 / 0.15);
207
+ --shadow-xl: 0 20px 25px -5px oklch(0 0 0 / 0.15), 0 8px 10px -6px oklch(0 0 0 / 0.15);
208
+ --shadow-2xl: 0 25px 50px -12px oklch(0 0 0 / 0.25);
214
209
  }
package/src/data/di.ts CHANGED
@@ -7,6 +7,7 @@ export const FluxFlyoutInjectionKey: InjectionKey<FluxFlyoutInjection> = Symbol(
7
7
  export const FluxFilterInjectionKey: InjectionKey<FluxFilterInjection> = Symbol();
8
8
  export const FluxFormFieldInjectionKey: InjectionKey<FluxFormFieldInjection> = Symbol();
9
9
  export const FluxTableInjectionKey: InjectionKey<FluxTableInjection> = Symbol();
10
+ export const FluxTooltipInjectionKey: InjectionKey<FluxTooltipInjection> = Symbol();
10
11
 
11
12
  export type FluxExpandableGroupInjection = {
12
13
  closeAll(): void;
@@ -40,3 +41,7 @@ export type FluxTableInjection = {
40
41
  readonly isSeparated: boolean;
41
42
  readonly isStriped: boolean;
42
43
  };
44
+
45
+ export type FluxTooltipInjection = {
46
+ calculate(): void;
47
+ };
package/src/data/i18n.ts CHANGED
@@ -18,7 +18,7 @@ export const english = {
18
18
  'flux.preview': 'Preview',
19
19
  'flux.previewClose': 'Close preview',
20
20
  'flux.displayingOf': '{from}–{to} of {total}',
21
- 'flux.rowsPerPage': 'Rows per page',
21
+ 'flux.showN': 'Show {n}',
22
22
  'flux.next': 'Next',
23
23
  'flux.noItems': 'There are no items (left).',
24
24
  'flux.pagination': 'Pagination',
@@ -10,7 +10,7 @@ export let iconRegistry: IconRegistry = {};
10
10
  export function fluxRegisterIcons(icons: Icons): void {
11
11
  iconRegistry = Object.keys(icons).reduce((acc: IconRegistry, key: string) => {
12
12
  const {icon, iconName} = icons[key];
13
- acc[iconName] = icon;
13
+ acc[iconName as FluxIconName] = icon;
14
14
 
15
15
  if (Array.isArray(icon[2])) {
16
16
  icon[2].forEach((iconName: string) => acc[iconName as FluxIconName] = icon);
package/src/data/store.ts CHANGED
@@ -20,7 +20,7 @@ export type FluxStore = FluxState & {
20
20
  addPrompt(spec: Omit<FluxPromptObject, 'id'>): number;
21
21
  addSnackbar(spec: Omit<FluxSnackbarObject, 'id'>): number;
22
22
  addTooltip(spec: Omit<FluxTooltipObject, 'id'>): number;
23
- registerDialog(): VoidFunction;
23
+ registerDialog(): [number, VoidFunction];
24
24
  removeAlert(id: number): void;
25
25
  removeConfirm(id: number): void;
26
26
  removePrompt(id: number): void;
@@ -104,9 +104,11 @@ export function addTooltip(spec: Omit<FluxTooltipObject, 'id'>): number {
104
104
  return id;
105
105
  }
106
106
 
107
- export function registerDialog(): VoidFunction {
108
- ++state.dialogCount;
109
- return () => --state.dialogCount;
107
+ export function registerDialog(): [number, VoidFunction] {
108
+ return [
109
+ ++state.dialogCount,
110
+ () => --state.dialogCount
111
+ ];
110
112
  }
111
113
 
112
114
  export function removeAlert(id: number): void {
package/src/index.ts CHANGED
@@ -20,6 +20,7 @@ export type {
20
20
  FluxFilterInjection,
21
21
  FluxFlyoutInjection,
22
22
  FluxFormFieldInjection,
23
+ FluxTooltipInjection,
23
24
  FluxState,
24
25
  FluxStore
25
26
  } from './data';
@@ -1,7 +1,8 @@
1
- import { flattenVNodeTree } from '@flux-ui/internals';
2
- import { Component, getCurrentInstance, RenderFunction, Slots } from 'vue';
3
- import { Comment, h, onMounted, onUnmounted, SetupContext, Teleport, VNode } from 'vue';
1
+ import { flattenVNodeTree, useFocusTrap } from '@flux-ui/internals';
2
+ import type { Component, RenderFunction, SetupContext, Slots, VNode } from 'vue';
3
+ import { Comment, h, onUnmounted, ref, Teleport, watch } from 'vue';
4
4
  import { registerDialog, useFluxStore } from '$flux/data';
5
+ import $style from '$flux/css/component/Overlay.module.scss';
5
6
 
6
7
  type Emit = SetupContext<['close']>['emit'];
7
8
  type Props = {
@@ -9,27 +10,38 @@ type Props = {
9
10
  readonly viewKey?: string;
10
11
  };
11
12
 
13
+ const TARGET_SELECTOR = `.${$style.overlayProvider.replaceAll(' ', '.')}`;
14
+
12
15
  export default function (attrs: object, props: Props, emit: Emit, slots: Slots, className: string, transition: Component): RenderFunction {
13
- const instance = getCurrentInstance();
14
16
  let unregister: Function | null = null;
15
17
  let zIndex = 0;
16
18
 
17
- onMounted(() => {
18
- window.addEventListener('keydown', onKeyDown);
19
- });
19
+ const dialogRef = ref<HTMLElement>();
20
+
21
+ useFocusTrap(dialogRef);
20
22
 
21
23
  onUnmounted(() => {
22
- window.removeEventListener('keydown', onKeyDown);
23
24
  unregister?.();
24
25
  });
25
26
 
27
+ watch(dialogRef, (dialog, _, onCleanup) => {
28
+ if (!dialog) {
29
+ return;
30
+ }
31
+
32
+ dialog.addEventListener('keydown', onKeyDown, {passive: true});
33
+ dialog.focus();
34
+
35
+ onCleanup(() => {
36
+ dialog.removeEventListener('keydown', onKeyDown);
37
+ });
38
+ });
39
+
26
40
  function onKeyDown(evt: KeyboardEvent): void {
27
41
  if (evt.key !== 'Escape' || !unregister || !props.isCloseable) {
28
42
  return;
29
43
  }
30
44
 
31
- evt.preventDefault();
32
- evt.stopPropagation();
33
45
  emit('close');
34
46
  }
35
47
 
@@ -38,25 +50,28 @@ export default function (attrs: object, props: Props, emit: Emit, slots: Slots,
38
50
 
39
51
  const children = flattenVNodeTree(slots.default?.() ?? []);
40
52
  const isVisible = children.length > 0 && children.some(child => child.type !== Comment);
41
- const content: VNode[] = [];
53
+ let content: VNode | undefined;
42
54
 
43
55
  if (isVisible) {
44
56
  if (!unregister) {
45
- unregister = registerDialog();
46
- zIndex = dialogCount + 1000;
57
+ [zIndex, unregister] = registerDialog();
47
58
  }
48
59
 
49
- content.push(h('div', {
60
+ content = h('div', {
50
61
  key: props.viewKey,
51
- class: className,
52
- style: {zIndex}
53
- }, children));
62
+ ref: dialogRef,
63
+ class: [className, zIndex === dialogCount && $style.isCurrent],
64
+ style: {
65
+ zIndex: zIndex + 1000
66
+ },
67
+ tabindex: 0
68
+ }, children);
54
69
  } else {
55
70
  unregister?.();
56
71
  unregister = null;
57
72
  }
58
73
 
59
- return h(Teleport, {disabled: content.length === 0, to: instance?.appContext.app._container}, [
74
+ return h(Teleport, {defer: true, disabled: !content, to: TARGET_SELECTOR}, [
60
75
  h(transition, attrs, {
61
76
  default: () => content
62
77
  })