nuxt-hs-ui 1.0.10 → 2.0.2

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 (112) hide show
  1. package/README.md +11 -4
  2. package/dist/module.d.mts +10 -2
  3. package/dist/module.d.ts +10 -2
  4. package/dist/module.json +5 -2
  5. package/dist/module.mjs +90 -51
  6. package/dist/runtime/assets/flatpickr-dark.css +1 -0
  7. package/dist/runtime/assets/flatpickr-month-select-style.css +1 -0
  8. package/dist/runtime/assets/tabulator-custom.css +1 -0
  9. package/dist/runtime/assets/tabulator.css +1 -0
  10. package/dist/runtime/assets/vue-select.css +1 -0
  11. package/dist/runtime/components/{hs-fc/btn/line-loading.vue → form/btn-line-loading.vue} +28 -42
  12. package/dist/runtime/components/form/btn.vue +488 -0
  13. package/dist/runtime/components/form/check-box.vue +352 -0
  14. package/dist/runtime/components/form/check-list.vue +354 -0
  15. package/dist/runtime/components/form/datepicker copy.vue +770 -0
  16. package/dist/runtime/components/form/datepicker.vue +897 -0
  17. package/dist/runtime/components/form/input-frame.vue +272 -0
  18. package/dist/runtime/components/form/radio.vue +685 -0
  19. package/dist/runtime/components/form/select-img-icon.vue +53 -0
  20. package/dist/runtime/components/form/select.vue +438 -0
  21. package/dist/runtime/components/form/text-box.vue +375 -0
  22. package/dist/runtime/components/form/textarea.vue +466 -0
  23. package/dist/runtime/components/form/value-box.vue +681 -0
  24. package/dist/runtime/components/interactive/alert.vue +113 -0
  25. package/dist/runtime/components/{hs-ui → interactive}/block-loading.vue +42 -59
  26. package/dist/runtime/components/{hs-ui/dialog/index.vue → interactive/dialog.vue} +132 -127
  27. package/dist/runtime/components/interactive/modal-bg.vue +82 -0
  28. package/dist/runtime/components/interactive/modal.vue +143 -0
  29. package/dist/runtime/components/{hs-ui/toast/index.vue → interactive/toast.vue} +76 -109
  30. package/dist/runtime/components/{hs-ui → interactive}/window-loader.vue +12 -9
  31. package/dist/runtime/components/{hs-ui → layout}/accordion.vue +21 -30
  32. package/dist/runtime/components/layout/aspect-box.vue +71 -0
  33. package/dist/runtime/components/layout/card-item.vue +193 -0
  34. package/dist/runtime/components/layout/card.vue +42 -0
  35. package/dist/runtime/components/layout/container.vue +40 -0
  36. package/dist/runtime/components/misc/breadcrumb.vue +96 -0
  37. package/dist/runtime/components/misc/tabulator.vue +187 -0
  38. package/dist/runtime/components/misc/view-name-display-target.vue +39 -0
  39. package/dist/runtime/components/misc/view-name-display.vue +90 -0
  40. package/dist/runtime/composables/use-hs-dialog.d.ts +40 -0
  41. package/dist/runtime/composables/{use-hs-ui-dialog.js → use-hs-dialog.js} +15 -10
  42. package/dist/runtime/composables/{use-hs-form-focus.d.ts → use-hs-focus.d.ts} +1 -1
  43. package/dist/runtime/composables/{use-hs-form-focus.js → use-hs-focus.js} +2 -4
  44. package/dist/runtime/composables/use-hs-misc.d.ts +22 -0
  45. package/dist/runtime/composables/use-hs-misc.js +62 -0
  46. package/dist/runtime/composables/use-hs-modal.d.ts +31 -0
  47. package/dist/runtime/{components/hs-ui/modal/use-ui-modal.js → composables/use-hs-modal.js} +18 -16
  48. package/dist/runtime/composables/use-hs-multi-lang.d.ts +14 -6
  49. package/dist/runtime/composables/use-hs-multi-lang.js +44 -11
  50. package/dist/runtime/composables/{use-hs-ui-toast.d.ts → use-hs-toast.d.ts} +3 -3
  51. package/dist/runtime/composables/{use-hs-ui-toast.js → use-hs-toast.js} +4 -5
  52. package/dist/runtime/composables/{use-hs-ui-window-loader.d.ts → use-hs-window-loader.d.ts} +1 -1
  53. package/dist/runtime/composables/{use-hs-ui-window-loader.js → use-hs-window-loader.js} +1 -2
  54. package/dist/runtime/plugin/v-select.d.ts +2 -0
  55. package/dist/runtime/plugin/v-select.js +5 -0
  56. package/dist/runtime/style.css +22 -1
  57. package/dist/runtime/tailwind.css +78 -0
  58. package/dist/runtime/types/app.config.d.ts +5 -0
  59. package/dist/runtime/{components/hs-ui/dialog/index.type.d.ts → types/dialog.d.ts} +3 -3
  60. package/dist/runtime/{components/hs-ui/toast/index.type.d.ts → types/toast.d.ts} +1 -2
  61. package/dist/runtime/{components/hs-ui/toast/index.type.js → types/toast.js} +0 -1
  62. package/dist/runtime/utils/class-style.d.ts +6 -0
  63. package/dist/runtime/utils/class-style.js +27 -0
  64. package/dist/runtime/utils/com.d.ts +6 -0
  65. package/dist/runtime/{lib → utils}/com.js +1 -4
  66. package/dist/runtime/utils/dayjs.d.ts +53 -0
  67. package/dist/runtime/utils/dayjs.js +124 -0
  68. package/dist/runtime/utils/float.d.ts +2 -0
  69. package/dist/runtime/utils/float.js +35 -0
  70. package/dist/runtime/utils/multi-lang-object.d.ts +17 -0
  71. package/dist/runtime/utils/multi-lang-object.js +34 -0
  72. package/dist/runtime/{lib → utils}/multi-lang.d.ts +1 -1
  73. package/dist/runtime/{lib → utils}/multi-lang.js +31 -27
  74. package/dist/runtime/{lib → utils}/number.d.ts +2 -4
  75. package/dist/runtime/{lib → utils}/number.js +29 -69
  76. package/dist/runtime/utils/object.d.ts +46 -0
  77. package/dist/runtime/utils/object.js +107 -0
  78. package/dist/runtime/utils/select-item.d.ts +31 -0
  79. package/dist/runtime/utils/select.d.ts +14 -0
  80. package/dist/runtime/utils/select.js +36 -0
  81. package/dist/runtime/utils/string.d.ts +39 -0
  82. package/dist/runtime/utils/string.js +125 -0
  83. package/dist/runtime/utils/tabulator.d.ts +108 -0
  84. package/dist/runtime/utils/tabulator.js +296 -0
  85. package/dist/runtime/utils/theme.d.ts +21 -0
  86. package/dist/runtime/utils/theme.js +31 -0
  87. package/dist/runtime/utils/tv.d.ts +101 -0
  88. package/dist/runtime/utils/tv.js +26 -0
  89. package/dist/runtime/utils/wareki.d.ts +3 -0
  90. package/dist/runtime/utils/wareki.js +106 -0
  91. package/dist/types.d.mts +1 -17
  92. package/dist/types.d.ts +1 -17
  93. package/package.json +99 -37
  94. package/dist/runtime/components/hs-fc/btn/index.vue +0 -510
  95. package/dist/runtime/components/hs-ui/aspect-box.vue +0 -83
  96. package/dist/runtime/components/hs-ui/card-item.vue +0 -141
  97. package/dist/runtime/components/hs-ui/card.vue +0 -54
  98. package/dist/runtime/components/hs-ui/container.vue +0 -50
  99. package/dist/runtime/components/hs-ui/modal/bg.vue +0 -94
  100. package/dist/runtime/components/hs-ui/modal/index.vue +0 -206
  101. package/dist/runtime/components/hs-ui/modal/use-ui-modal.d.ts +0 -20
  102. package/dist/runtime/components/v-test.vue +0 -60
  103. package/dist/runtime/composables/use-hs-ui-dialog.d.ts +0 -22
  104. package/dist/runtime/lib/class-style.d.ts +0 -8
  105. package/dist/runtime/lib/class-style.js +0 -59
  106. package/dist/runtime/lib/com.d.ts +0 -14
  107. package/dist/runtime/lib/prefix.d.ts +0 -2
  108. package/dist/runtime/lib/prefix.js +0 -17
  109. package/dist/runtime/lib/theme.d.ts +0 -2
  110. package/dist/runtime/lib/theme.js +0 -21
  111. /package/dist/runtime/{components/hs-ui/dialog/index.type.js → types/dialog.js} +0 -0
  112. /package/dist/runtime/{components/hs-fc/hoge → utils/select-item.js} +0 -0
@@ -1,60 +0,0 @@
1
- <script setup lang="ts">
2
- // [ vue ]
3
- import { computed, ref } from 'vue';
4
- // [ NUXT ]
5
- import { useRuntimeConfig } from '#imports';
6
- // [ tailwind ]
7
- import { extendTailwindMerge } from 'tailwind-merge';
8
- import { type ClassType, ClassTypeToString } from '../lib/com';
9
- import { GetPrefix, RemovePrefix } from '../lib/prefix';
10
- // ----------------------------------------------------------------------------
11
- const runtimeConfig: any = useRuntimeConfig();
12
- const prefix = GetPrefix(runtimeConfig);
13
- // ----------------------------------------------------------------------------
14
- const twMerge = extendTailwindMerge({
15
- prefix: prefix,
16
- });
17
- // ----------------------------------------------------------------------------
18
-
19
- interface Props {
20
- class?: ClassType;
21
- text?: string;
22
- }
23
- const props = withDefaults(defineProps<Props>(), {
24
- text: 'hello',
25
- class: '',
26
- });
27
-
28
- const baseClass = RemovePrefix(prefix, [
29
- //
30
- 'bg-blue-400',
31
- 'tw-bg-blue-400',
32
- `m-0`,
33
- `sm:m-4`,
34
- `tw-m-0`,
35
- `sm:tw-m-4`,
36
- ]);
37
-
38
- const topClass = computed(() => {
39
- return twMerge(baseClass, ClassTypeToString(props.class));
40
- });
41
- const counter = ref(0);
42
- </script>
43
- <template>
44
- <div class="tw-my-3">
45
- <button class="text-message" :class="topClass" @click="counter++">
46
- {{ topClass }}
47
- </button>
48
- </div>
49
- </template>
50
-
51
- <style scoped>
52
- .text-message {
53
- color: black;
54
- border: solid 2px rgb(227, 123, 27);
55
- padding: 2px 10px;
56
- border-radius: 4px;
57
- outline: none;
58
- font-weight: bold;
59
- }
60
- </style>
@@ -1,22 +0,0 @@
1
- import { type MultiLang } from '../lib/multi-lang.js';
2
- import { DialogItem, DialogResult, type DialogOption } from '../components/hs-ui/dialog/index.type.js';
3
- interface State {
4
- state: {
5
- id: number;
6
- pendingList: {
7
- ts: string;
8
- data: DialogItem;
9
- }[];
10
- };
11
- }
12
- export declare const useHsUiDialog: import("pinia").StoreDefinition<"HsUiDialog", State, {
13
- InitOption: () => () => DialogOption;
14
- Result: () => {
15
- readonly left: "left";
16
- readonly right: "right";
17
- readonly cancel: "cancel";
18
- };
19
- }, {
20
- Show(message: MultiLang, title: MultiLang, option?: DialogOption): Promise<DialogResult>;
21
- }>;
22
- export {};
@@ -1,8 +0,0 @@
1
- type ClassTypeObje = {
2
- [key: string]: boolean;
3
- };
4
- type ClassTypeArray = (string | ClassTypeObje | ClassTypeArray)[];
5
- export type ClassType = string | ClassTypeObje | ClassTypeArray;
6
- export declare const ClassTypeToString: (c: ClassType | undefined) => string;
7
- export declare const ClassTypeToArray: (c: ClassType | undefined) => string[];
8
- export {};
@@ -1,59 +0,0 @@
1
- const typeOf = (obj) => {
2
- return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
3
- };
4
- export const ClassTypeToString = (c) => {
5
- if (c === void 0)
6
- return "";
7
- const valueType = typeOf(c);
8
- if (valueType === "string")
9
- return c;
10
- if (valueType === "undefined")
11
- return "";
12
- if (valueType === "array") {
13
- return c.reduce((ret, row) => {
14
- const a = ClassTypeToString(row);
15
- if (a) {
16
- ret.push(a);
17
- }
18
- return ret;
19
- }, []).join(" ");
20
- }
21
- if (valueType === "object") {
22
- return Object.keys(c).reduce((ret, key) => {
23
- const b = c[key];
24
- if (b) {
25
- ret.push(key);
26
- }
27
- return ret;
28
- }, []).join(" ");
29
- }
30
- return "";
31
- };
32
- export const ClassTypeToArray = (c) => {
33
- if (c === void 0)
34
- return [];
35
- const valueType = typeOf(c);
36
- if (valueType === "string")
37
- return [c];
38
- if (valueType === "undefined")
39
- return [];
40
- if (valueType === "array") {
41
- return c.reduce((ret, row) => {
42
- const a = ClassTypeToString(row);
43
- if (a) {
44
- ret.push(a);
45
- }
46
- return ret;
47
- }, []);
48
- }
49
- if (valueType === "object") {
50
- return Object.keys(c).reduce((ret, key) => {
51
- const b = c[key];
52
- if (b) {
53
- ret.push(key);
54
- }
55
- return ret;
56
- }, []);
57
- }
58
- return [];
59
- };
@@ -1,14 +0,0 @@
1
- export { type ClassType, ClassTypeToString } from './class-style.js';
2
- export { RemovePrefix } from './prefix.js';
3
- /**
4
- * ユニークな文字列を生成する
5
- */
6
- export declare const GenerateUniqeKey: (len?: number) => string;
7
- /**
8
- * 一定時間処理を待機
9
- */
10
- export declare const Sleep: (time: number) => Promise<unknown>;
11
- /**
12
- * マウント後にブラウザ側で実行すること
13
- */
14
- export declare const IsMobile: () => boolean;
@@ -1,2 +0,0 @@
1
- export declare const GetPrefix: (runtimeConfig: any) => "" | "tw-";
2
- export declare const RemovePrefix: (prefix: string, arg: string[]) => string[];
@@ -1,17 +0,0 @@
1
- export const GetPrefix = (runtimeConfig) => {
2
- const config = runtimeConfig.public.hsui;
3
- const prefix = config?.prefix || "";
4
- if (prefix === "tw-")
5
- return "tw-";
6
- return "";
7
- };
8
- const checkReg = /(?:[ :!]|^|\n)tw-/;
9
- export const RemovePrefix = (prefix, arg) => {
10
- const ret = arg.reduce((ret2, row) => {
11
- if (prefix === "" && !checkReg.test(row) || prefix !== "" && checkReg.test(row)) {
12
- ret2.push(row);
13
- }
14
- return ret2;
15
- }, []);
16
- return ret;
17
- };
@@ -1,2 +0,0 @@
1
- export declare const Theme: readonly ["main0", "main1", "main2", "main3", "accent1", "accent2", "info", "link", "download", "success", "warn", "error", "white", "black", "dark", "back"];
2
- export type Theme = (typeof Theme)[number];
@@ -1,21 +0,0 @@
1
- export const Theme = [
2
- //
3
- "main0",
4
- "main1",
5
- "main2",
6
- "main3",
7
- "accent1",
8
- "accent2",
9
- //
10
- "info",
11
- "link",
12
- "download",
13
- "success",
14
- "warn",
15
- "error",
16
- //
17
- "white",
18
- "black",
19
- "dark",
20
- "back"
21
- ];