@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,4 +1,4 @@
1
- import { Component, RenderFunction, Slots, SetupContext } from 'vue';
1
+ import { Component, RenderFunction, SetupContext, Slots } from 'vue';
2
2
  type Emit = SetupContext<['close']>['emit'];
3
3
  type Props = {
4
4
  readonly isCloseable?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"createDialogRenderer.d.ts","sourceRoot":"","sources":["../../src/util/createDialogRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAsB,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAsC,YAAY,EAAmB,MAAM,KAAK,CAAC;AAGxF,KAAK,IAAI,GAAG,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5C,KAAK,KAAK,GAAG;IACT,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,WAAW,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,cAAc,CAqDxI"}
1
+ {"version":3,"file":"createDialogRenderer.d.ts","sourceRoot":"","sources":["../../src/util/createDialogRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,EAAS,MAAM,KAAK,CAAC;AAKjF,KAAK,IAAI,GAAG,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5C,KAAK,KAAK,GAAG;IACT,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAIF,MAAM,CAAC,OAAO,WAAW,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,cAAc,CAiExI"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flux-ui/components",
3
3
  "description": "A set of opiniated UI components.",
4
- "version": "3.0.0-next.2",
4
+ "version": "3.0.0-next.21",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
@@ -23,8 +23,7 @@
23
23
  ],
24
24
  "scripts": {
25
25
  "build": "vue-tsc && vite build",
26
- "dev": "vite build --mode dev --watch",
27
- "prepublishOnly": "cp ../../README.md ."
26
+ "dev": "vite build --mode dev --watch"
28
27
  },
29
28
  "engines": {
30
29
  "node": ">=23"
@@ -32,9 +31,9 @@
32
31
  "exports": {
33
32
  ".": {
34
33
  "types": "./dist/index.d.ts",
35
- "default": "./dist/flux.js"
34
+ "default": "./dist/index.js"
36
35
  },
37
- "./style.css": "./dist/flux.css",
36
+ "./style.css": "./dist/index.css",
38
37
  "./*": "./*"
39
38
  },
40
39
  "publishConfig": {
@@ -46,32 +45,32 @@
46
45
  "src",
47
46
  "tsconfig.json"
48
47
  ],
49
- "main": "./dist/flux.js",
50
- "module": "./dist/flux.js",
48
+ "main": "./dist/index.js",
49
+ "module": "./dist/index.js",
51
50
  "types": "./dist/index.d.ts",
52
51
  "typings": "./dist/index.d.ts",
53
52
  "sideEffects": false,
54
53
  "dependencies": {
55
- "@basmilius/utils": "^1.12.0",
56
- "@flux-ui/internals": "3.0.0-next.0",
57
- "@flux-ui/types": "3.0.0-next.0",
58
- "@fortawesome/fontawesome-common-types": "^6.7.2",
54
+ "@basmilius/utils": "^2.13.0",
55
+ "@flux-ui/internals": "3.0.0-next.21",
56
+ "@flux-ui/types": "3.0.0-next.21",
57
+ "@fortawesome/fontawesome-common-types": "^7.1.0",
59
58
  "clsx": "^2.1.1",
60
59
  "imask": "^7.6.1",
61
60
  "lodash-es": "^4.17.21",
62
- "luxon": "^3.6.1",
63
- "vue": "^3.5.13"
61
+ "luxon": "^3.7.2",
62
+ "vue": "^3.5.23"
64
63
  },
65
64
  "devDependencies": {
66
- "@basmilius/vite-vue-preset": "^2.6.0",
65
+ "@basmilius/vite-preset": "^2.13.0",
67
66
  "@types/lodash-es": "^4.17.12",
68
- "@types/luxon": "^3.6.2",
69
- "@types/node": "^22.14.1",
70
- "@vitejs/plugin-vue": "^5.2.3",
71
- "pinia": "^3.0.2",
72
- "sass-embedded": "^1.86.3",
73
- "typescript": "^5.8.3",
74
- "vite": "^6.2.6",
75
- "vue-tsc": "^2.2.8"
67
+ "@types/luxon": "^3.7.1",
68
+ "@types/node": "^24.10.0",
69
+ "@vitejs/plugin-vue": "^6.0.1",
70
+ "pinia": "^3.0.4",
71
+ "sass-embedded": "^1.93.3",
72
+ "typescript": "^5.9.3",
73
+ "vite": "^7.2.1",
74
+ "vue-tsc": "^3.1.3"
76
75
  }
77
76
  }
@@ -1,17 +1,26 @@
1
1
  <template>
2
2
  <FluxTable
3
+ :fill-columns="fillColumns"
3
4
  :is-bordered="isBordered"
4
5
  :is-hoverable="isHoverable"
5
6
  :is-loading="isLoading"
6
7
  :is-separated="isSeparated"
7
8
  :is-striped="isStriped">
9
+ <template
10
+ v-if="'colgroups' in slots"
11
+ #colgroups>
12
+ <slot name="colgroups"/>
13
+ </template>
14
+
8
15
  <template
9
16
  v-if="'header' in slots"
10
17
  #header>
18
+ <slot name="filter" v-bind="{page, perPage, items: limitedItems, total}"/>
19
+
11
20
  <FluxTableRow>
12
21
  <slot
13
22
  name="header"
14
- v-bind="{page, perPage, rows, total}"/>
23
+ v-bind="{page, perPage, items: limitedItems, total}"/>
15
24
  </FluxTableRow>
16
25
  </template>
17
26
 
@@ -21,17 +30,33 @@
21
30
  <FluxTableRow>
22
31
  <slot
23
32
  name="footer"
24
- v-bind="{page, perPage, rows, total}"/>
33
+ v-bind="{page, perPage, items: limitedItems, total}"/>
25
34
  </FluxTableRow>
26
35
  </template>
27
36
 
37
+ <template
38
+ v-if="total > limits[0]"
39
+ #pagination>
40
+ <slot
41
+ name="pagination"
42
+ v-bind="{page, perPage, items: limitedItems, total}">
43
+ <FluxPaginationBar
44
+ :limits="limits"
45
+ :page="page"
46
+ :per-page="perPage"
47
+ :total="total"
48
+ @limit="emit('limit', $event)"
49
+ @navigate="emit('navigate', $event)"/>
50
+ </slot>
51
+ </template>
52
+
28
53
  <FluxTableRow
29
- v-for="(row, index) of rows"
30
- :key="uniqueKey ? row[uniqueKey] : index">
54
+ v-for="(item, index) of limitedItems"
55
+ :key="uniqueKey ? item[uniqueKey] : index">
31
56
  <template v-for="(_, name) of slots">
32
57
  <slot
33
- v-if="name !== 'footer' && name !== 'header'"
34
- v-bind="{index, page, perPage, row, rows, total}"
58
+ v-if="!IGNORED_SLOTS.includes(name as string)"
59
+ v-bind="{index, item, items: limitedItems, page, perPage, total}"
35
60
  :name="name"/>
36
61
  </template>
37
62
  </FluxTableRow>
@@ -42,25 +67,36 @@
42
67
  lang="ts"
43
68
  setup
44
69
  generic="T extends Record<string, any>">
70
+ import type { VNode } from 'vue';
45
71
  import { computed } from 'vue';
72
+ import FluxPaginationBar from './FluxPaginationBar.vue';
46
73
  import FluxTable from './FluxTable.vue';
47
74
  import FluxTableRow from './FluxTableRow.vue';
48
75
 
76
+ const IGNORED_SLOTS: string[] = ['filter', 'header', 'footer', 'colgroups', 'pagination'];
77
+
78
+ const emit = defineEmits<{
79
+ limit: [number];
80
+ navigate: [number];
81
+ }>();
82
+
49
83
  const {
50
84
  isBordered = true,
51
85
  isHoverable = false,
52
86
  isLoading = false,
53
87
  isSeparated = true,
54
88
  isStriped = false,
55
- dataSet,
89
+ items,
56
90
  perPage
57
91
  } = defineProps<{
58
- readonly dataSet: T[];
92
+ readonly fillColumns?: number;
59
93
  readonly isBordered?: boolean;
60
94
  readonly isHoverable?: boolean;
61
95
  readonly isLoading?: boolean;
62
96
  readonly isSeparated?: boolean;
63
97
  readonly isStriped?: boolean;
98
+ readonly items: T[];
99
+ readonly limits: number[];
64
100
  readonly page: number;
65
101
  readonly perPage: number;
66
102
  readonly total: number;
@@ -72,25 +108,41 @@
72
108
  readonly index: number;
73
109
  readonly page: number;
74
110
  readonly perPage: number;
75
- readonly row: T;
76
- readonly rows: T[];
111
+ readonly item: T;
112
+ readonly items: T[];
77
113
  readonly total: number;
78
- }) => any;
114
+ }) => VNode;
115
+
116
+ filter(props: {
117
+ readonly page: number;
118
+ readonly perPage: number;
119
+ readonly items: T[];
120
+ readonly total: number;
121
+ }): VNode;
79
122
 
80
123
  footer(props: {
81
124
  readonly page: number;
82
125
  readonly perPage: number;
83
- readonly rows: T[];
126
+ readonly items: T[];
84
127
  readonly total: number;
85
- }): any;
128
+ }): VNode;
86
129
 
87
130
  header(props: {
88
131
  readonly page: number;
89
132
  readonly perPage: number;
90
- readonly rows: T[];
133
+ readonly items: T[];
91
134
  readonly total: number;
92
- }): any;
135
+ }): VNode;
136
+
137
+ pagination(props: {
138
+ readonly page: number;
139
+ readonly perPage: number;
140
+ readonly items: T[];
141
+ readonly total: number;
142
+ }): VNode;
143
+
144
+ colgroups(): VNode;
93
145
  }>();
94
146
 
95
- const rows = computed(() => dataSet.slice(0, perPage));
147
+ const limitedItems = computed(() => items.slice(0, perPage));
96
148
  </script>
@@ -131,7 +131,7 @@
131
131
  import { useCalendar, useCalendarMonthSwitcher, useCalendarYearSwitcher } from '@flux-ui/internals';
132
132
  import { clsx } from 'clsx';
133
133
  import { DateTime } from 'luxon';
134
- import { computed, ref, unref, useId } from 'vue';
134
+ import { computed, ref, unref, useId, watch } from 'vue';
135
135
  import { useTranslate } from '$flux/composable/private';
136
136
  import { FluxFadeTransition, FluxVerticalWindowTransition, FluxWindowTransition } from '$flux/transition';
137
137
  import FluxSecondaryButton from './FluxSecondaryButton.vue';
@@ -198,6 +198,10 @@
198
198
  }
199
199
  });
200
200
 
201
+ watch(modelValue, () => {
202
+ setViewDate(getInitialDate());
203
+ });
204
+
201
205
  function getInitialDate(): DateTime {
202
206
  const value = unref(modelValue);
203
207
  let date: DateTime;
@@ -39,7 +39,7 @@
39
39
  <script
40
40
  lang="ts"
41
41
  setup>
42
- import { unrefTemplateElement, useFocusTrap } from '@flux-ui/internals';
42
+ import { isSSR, unrefTemplateElement, useEventListener, useFocusTrap } from '@flux-ui/internals';
43
43
  import type { FluxDirection } from '@flux-ui/types';
44
44
  import { clsx } from 'clsx';
45
45
  import { provide, ref, unref, useTemplateRef, watch } from 'vue';
@@ -88,6 +88,7 @@
88
88
  const paneMarginX = ref(0);
89
89
  const paneMarginY = ref(0);
90
90
 
91
+ !isSSR && useEventListener(ref(window), 'resize', () => unref(isOpen) && reposition());
91
92
  useFocusTrap(paneRef);
92
93
 
93
94
  function close(): void {
@@ -2,6 +2,7 @@
2
2
  <div
3
3
  :class="clsx(
4
4
  disabled ? $style.formInputDisabled : $style.formInputEnabled,
5
+ isCondensed && $style.isCondensed,
5
6
  isSecondary && $style.isSecondary
6
7
  )"
7
8
  :aria-disabled="disabled ? true : undefined">
@@ -85,6 +86,7 @@
85
86
  readonly iconLeading?: FluxIconName;
86
87
  readonly iconTrailing?: FluxIconName;
87
88
  readonly disabled?: boolean;
89
+ readonly isCondensed?: boolean;
88
90
  readonly isReadonly?: boolean;
89
91
  readonly isSecondary?: boolean;
90
92
  readonly max?: string | number;
@@ -208,7 +210,7 @@
208
210
 
209
211
  if (value) {
210
212
  mask.value = value;
211
- localValue.value = mask.value;
213
+ modelValue.value = mask.value;
212
214
  }
213
215
 
214
216
  onCleanup(() => mask.destroy());
@@ -2,6 +2,7 @@
2
2
  <div
3
3
  :class="clsx(
4
4
  $style.formInputGroup,
5
+ isCondensed && $style.isCondensed,
5
6
  isSecondary && $style.isSecondary
6
7
  )"
7
8
  role="textbox">
@@ -17,6 +18,7 @@
17
18
 
18
19
  defineProps<{
19
20
  readonly isSecondary?: boolean;
21
+ readonly isCondensed?: boolean;
20
22
  }>();
21
23
 
22
24
  defineSlots<{
@@ -41,7 +41,7 @@
41
41
  }>();
42
42
 
43
43
  const disabled = useDisabled(toRef(() => componentDisabled));
44
- const {groups, selected, values} = useFormSelect(modelValue, isMultiple, options, modelSearch);
44
+ const {groups, selected, values} = useFormSelect(modelValue, isMultiple, toRef(() => options), modelSearch);
45
45
 
46
46
  function onDeselect(id: string | number | null): void {
47
47
  if (unref(isMultiple)) {
@@ -10,6 +10,7 @@
10
10
  <script
11
11
  lang="ts"
12
12
  setup>
13
+ import { isSSR } from '@flux-ui/internals';
13
14
  import type { FluxFormSelectEntry } from '@flux-ui/types';
14
15
  import { upperFirst } from 'lodash-es';
15
16
  import { computed, toRef } from 'vue';
@@ -651,6 +652,10 @@
651
652
  const translate = useTranslate();
652
653
 
653
654
  const options = computed<FluxFormSelectEntry[]>(() => {
655
+ if (isSSR) {
656
+ return [];
657
+ }
658
+
654
659
  const groups: Record<string, FluxFormSelectEntry[]> = {};
655
660
  const options: FluxFormSelectEntry[] = [];
656
661
 
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <FluxDropZone
3
+ :class="$style.gallery"
3
4
  accept="image/*"
4
5
  :disabled="!isEditable"
5
- :is-empty="items && items.length === 0"
6
6
  is-multiple
7
7
  placeholder-icon="image"
8
8
  :placeholder-button="translate('flux.galleryPlaceholderButton')"
@@ -11,7 +11,7 @@
11
11
  @select-multiple="onFilesSelected">
12
12
  <template #default="{showPicker}">
13
13
  <TransitionGroup
14
- :class="$style.gallery"
14
+ :class="$style.galleryGrid"
15
15
  :move-class="$style.galleryMove"
16
16
  tag="div">
17
17
  <template
@@ -14,6 +14,7 @@
14
14
  [$style.menuItemSelected]: isSelectable && isSelected
15
15
  }"
16
16
  :aria-checked="isSelectable ? isSelected : undefined"
17
+ :tabindex="tabindex"
17
18
  @click="$emit('click', $event)">
18
19
  <template
19
20
  v-if="isSelectable && (!iconLeading || isSelected)"
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div :class="$style.overlayProvider">
3
+ <div :class="$style.overlayShade"/>
4
+ </div>
5
+
6
+ <FluxOverlay size="medium">
7
+ <FluxAlert
8
+ v-for="alert of alerts"
9
+ :key="alert.id"
10
+ :alert="alert"/>
11
+ </FluxOverlay>
12
+
13
+ <FluxOverlay size="medium">
14
+ <FluxConfirm
15
+ v-for="confirm of confirms"
16
+ :key="confirm.id"
17
+ :confirm="confirm"/>
18
+ </FluxOverlay>
19
+
20
+ <FluxOverlay size="medium">
21
+ <FluxPrompt
22
+ v-for="prompt of prompts"
23
+ :key="prompt.id"
24
+ :prompt="prompt"/>
25
+ </FluxOverlay>
26
+ </template>
27
+
28
+ <script
29
+ lang="ts"
30
+ setup>
31
+ import { useFluxStore } from '$flux/data';
32
+ import FluxAlert from './FluxAlert.vue';
33
+ import FluxConfirm from './FluxConfirm.vue';
34
+ import FluxOverlay from './FluxOverlay.vue';
35
+ import FluxPrompt from './FluxPrompt.vue';
36
+ import $style from '$flux/css/component/Overlay.module.scss';
37
+
38
+ const {alerts, confirms, prompts} = useFluxStore();
39
+ </script>
@@ -1,52 +1,56 @@
1
1
  <template>
2
- <FluxButtonGroup
2
+ <nav
3
3
  :class="$style.pagination"
4
4
  role="navigation"
5
5
  :aria-label="translate('flux.pagination')">
6
- <FluxSecondaryButton
6
+ <FluxPaginationButton
7
7
  v-if="arrows || isCompact"
8
8
  :disabled="isPreviousDisabled"
9
9
  icon-leading="angle-left"
10
+ is-arrow
10
11
  :aria-label="translate('flux.previous')"
11
12
  @click="previous"/>
12
13
 
13
14
  <template
14
15
  v-if="!isCompact"
15
16
  v-for="p of visiblePages">
16
- <FluxSecondaryButton
17
+ <FluxPaginationButton
17
18
  v-if="p === 'dots'"
18
19
  disabled
19
- icon-leading="ellipsis-h"/>
20
+ icon-leading="ellipsis-h"
21
+ is-spacer/>
20
22
 
21
- <FluxPrimaryButton
23
+ <FluxPaginationButton
22
24
  v-else-if="p === page"
25
+ is-current
23
26
  :label="`${p}`"
24
27
  aria-current="page"/>
25
28
 
26
- <FluxSecondaryButton
29
+ <FluxPaginationButton
27
30
  v-else
28
31
  :label="`${p}`"
29
32
  @click="navigate(p)"/>
30
33
  </template>
31
34
 
32
35
  <template v-else>
33
- <FluxSecondaryButton
36
+ <FluxPaginationButton
34
37
  :class="$style.paginationCurrentZZ"
35
38
  @click="prompt"
36
39
  #before>
37
40
  <strong>{{ page }}</strong>
38
41
  <span>/</span>
39
42
  <span>{{ pages }}</span>
40
- </FluxSecondaryButton>
43
+ </FluxPaginationButton>
41
44
  </template>
42
45
 
43
- <FluxSecondaryButton
46
+ <FluxPaginationButton
44
47
  v-if="arrows || isCompact"
45
48
  :disabled="isNextDisabled"
46
49
  icon-leading="angle-right"
50
+ is-arrow
47
51
  :aria-label="translate('flux.next')"
48
52
  @click="next"/>
49
- </FluxButtonGroup>
53
+ </nav>
50
54
  </template>
51
55
 
52
56
  <script
@@ -55,9 +59,7 @@
55
59
  import { computed, unref } from 'vue';
56
60
  import { useTranslate } from '$flux/composable/private';
57
61
  import { showPrompt } from '$flux/data';
58
- import FluxButtonGroup from './FluxButtonGroup.vue';
59
- import FluxPrimaryButton from './FluxPrimaryButton.vue';
60
- import FluxSecondaryButton from './FluxSecondaryButton.vue';
62
+ import FluxPaginationButton from './FluxPaginationButton.vue';
61
63
  import $style from '$flux/css/component/Pagination.module.scss';
62
64
 
63
65
  const emit = defineEmits<{
@@ -89,7 +91,7 @@
89
91
 
90
92
  const sizes = {
91
93
  end: 1,
92
- middle: 1
94
+ middle: 2
93
95
  } as const;
94
96
 
95
97
  let dots = false;
@@ -1,40 +1,32 @@
1
1
  <template>
2
- <FluxStack :class="$style.paginationBar">
3
- <FluxFormInputGroup>
4
- <FluxFormInputAddition>
5
- <span>{{ translate('flux.rowsPerPage') }}</span>
6
- </FluxFormInputAddition>
7
-
8
- <FluxFormSelect
9
- v-model="limit"
10
- :options="limitOptions"/>
11
- </FluxFormInputGroup>
2
+ <div :class="$style.paginationBar">
3
+ <FluxPagination
4
+ v-if="total > perPage"
5
+ arrows
6
+ :page="page"
7
+ :per-page="perPage"
8
+ :total="total"
9
+ @navigate="$emit('navigate', $event)"/>
12
10
 
13
11
  <FluxSpacer :class="$style.paginationBarSpacer"/>
14
12
 
15
- <FluxFormInputGroup>
16
- <FluxFormInputAddition>
17
- <span>
18
- {{
19
- translate('flux.displayingOf', {
20
- from: (page - 1) * perPage + 1,
21
- to: Math.min(total, page * perPage),
22
- total: total
23
- })
24
- }}
25
- </span>
26
- </FluxFormInputAddition>
13
+ <div :class="$style.paginationBarLimit">
14
+ <span :class="$style.paginationBarLimitDisplayingOf">
15
+ {{
16
+ translate('flux.displayingOf', {
17
+ from: (page - 1) * perPage + 1,
18
+ to: Math.min(total, page * perPage),
19
+ total: total
20
+ })
21
+ }}
22
+ </span>
27
23
 
28
- <FluxPagination
29
- v-if="total > perPage"
30
- arrows
31
- is-compact
32
- :page="page"
33
- :per-page="perPage"
34
- :total="total"
35
- @navigate="$emit('navigate', $event)"/>
36
- </FluxFormInputGroup>
37
- </FluxStack>
24
+ <FluxFormSelect
25
+ v-model="limit"
26
+ :class="$style.paginationBarLimitSelect"
27
+ :options="limitOptions"/>
28
+ </div>
29
+ </div>
38
30
  </template>
39
31
 
40
32
  <script
@@ -43,12 +35,9 @@
43
35
  import type { FluxFormSelectOption } from '@flux-ui/types';
44
36
  import { computed, ref, watch } from 'vue';
45
37
  import { useTranslate } from '$flux/composable/private';
46
- import FluxFormInputAddition from './FluxFormInputAddition.vue';
47
- import FluxFormInputGroup from './FluxFormInputGroup.vue';
48
38
  import FluxFormSelect from './FluxFormSelect.vue';
49
39
  import FluxPagination from './FluxPagination.vue';
50
40
  import FluxSpacer from './FluxSpacer.vue';
51
- import FluxStack from './FluxStack.vue';
52
41
  import $style from '$flux/css/component/Pagination.module.scss';
53
42
 
54
43
  const emit = defineEmits<{
@@ -70,9 +59,9 @@
70
59
 
71
60
  const limit = ref(perPage);
72
61
 
73
- const limitOptions = computed(() => limits.map<FluxFormSelectOption>(limit => ({
74
- label: limit.toString(),
75
- value: limit
62
+ const limitOptions = computed(() => limits.map<FluxFormSelectOption>(n => ({
63
+ label: translate('flux.showN', {n}),
64
+ value: n
76
65
  })));
77
66
 
78
67
  watch(limit, limit => emit('limit', limit));
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <FluxButton
3
+ :="{type, disabled, iconLeading, iconTrailing, isFilled, isLoading, isSubmit, label, size, href, rel, target, to}"
4
+ :class="[
5
+ isArrow && $style.paginationButtonArrow,
6
+ isCurrent && $style.paginationButtonCurrent,
7
+ isSpacer && $style.paginationButtonSpacer
8
+ ]"
9
+ :css-class="$style.paginationButton"
10
+ :css-class-icon="$style.paginationButtonIcon"
11
+ :css-class-label="$style.paginationButtonLabel"
12
+ @click="$emit('click', $event)"
13
+ @mouseenter="$emit('mouseenter', $event)"
14
+ @mouseleave="$emit('mouseleave', $event)">
15
+ <template
16
+ v-for="slot of SLOTS"
17
+ #[slot]>
18
+ <slot :name="slot"/>
19
+ </template>
20
+ </FluxButton>
21
+ </template>
22
+
23
+ <script
24
+ lang="ts"
25
+ setup>
26
+ import type { FluxButtonEmits, FluxButtonProps, FluxButtonSlots } from '@flux-ui/types';
27
+ import FluxButton, { SLOTS } from './FluxButton.vue';
28
+ import $style from '$flux/css/component/Pagination.module.scss';
29
+
30
+ defineEmits<FluxButtonEmits>();
31
+
32
+ defineProps<FluxButtonProps & {
33
+ readonly isArrow?: boolean;
34
+ readonly isCurrent?: boolean;
35
+ readonly isSpacer?: boolean;
36
+ }>();
37
+
38
+ defineSlots<FluxButtonSlots>();
39
+ </script>
@@ -8,7 +8,7 @@
8
8
  :aria-valuemin="min">
9
9
  <div :class="isIndeterminate ? $style.progressBarTrackIndeterminate : $style.progressBarTrack">
10
10
  <div
11
- :class="$style.progressBarValue"
11
+ :class="position >= 1 ? $style.progressBarValueComplete : $style.progressBarValueIncomplete"
12
12
  :style="{
13
13
  width: `${isIndeterminate ? 100 : position * 100}%`
14
14
  }"/>