@digitalwalletcorp/vue-core 1.1.0 → 1.2.1

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 (67) hide show
  1. package/README.md +20 -9
  2. package/lib/accordion-fieldset.cjs +1 -1
  3. package/lib/accordion-fieldset.d.cts +25 -0
  4. package/lib/accordion-fieldset.js +1 -1
  5. package/lib/{accordion-fieldset.vue_vue_type_style_index_0_lang-tzJhLHyT.js → accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js} +11 -11
  6. package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs +1 -0
  7. package/lib/accordion-section.cjs +1 -1
  8. package/lib/accordion-section.d.cts +34 -0
  9. package/lib/accordion-section.js +1 -1
  10. package/lib/{accordion-section.vue_vue_type_style_index_0_lang-BBEywIH3.cjs → accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs} +1 -1
  11. package/lib/{accordion-section.vue_vue_type_style_index_0_lang-DAlUN0wH.js → accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js} +1 -1
  12. package/lib/components-C63HJoCn.cjs +1 -0
  13. package/lib/{components-xNQBXMzx.js → components-q4Cf97bO.js} +7 -7
  14. package/lib/components.d.cts +9 -0
  15. package/lib/global.d.cts +7 -0
  16. package/lib/hourglass-loading.d.cts +23 -0
  17. package/lib/index.cjs +1 -1
  18. package/lib/index.d.cts +3 -0
  19. package/lib/index.js +7 -7
  20. package/lib/internal/tab-group-context.d.cts +16 -0
  21. package/lib/internal/use-shrinkable.d.cts +12 -0
  22. package/lib/label-button.cjs +1 -1
  23. package/lib/label-button.d.cts +30 -0
  24. package/lib/label-button.js +1 -1
  25. package/lib/label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs +1 -0
  26. package/lib/{label-button.vue_vue_type_script_setup_true_lang-CoHrTUSs.js → label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js} +12 -12
  27. package/lib/label-icon.cjs +1 -1
  28. package/lib/label-icon.d.cts +30 -0
  29. package/lib/label-icon.js +1 -1
  30. package/lib/{label-icon.vue_vue_type_style_index_0_lang-C2URq6GP.cjs → label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs} +1 -1
  31. package/lib/{label-icon.vue_vue_type_style_index_0_lang-bQFkQ_gC.js → label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js} +1 -1
  32. package/lib/nuxt.cjs +1 -1
  33. package/lib/nuxt.d.cts +10 -0
  34. package/lib/nuxt.js +1 -1
  35. package/lib/page-section.cjs +1 -1
  36. package/lib/page-section.d.cts +34 -0
  37. package/lib/page-section.js +1 -1
  38. package/lib/{page-section.vue_vue_type_style_index_0_lang-bvQeBjUP.cjs → page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs} +1 -1
  39. package/lib/{page-section.vue_vue_type_style_index_0_lang-4MLb_sDZ.js → page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js} +1 -1
  40. package/lib/page-title.cjs +1 -1
  41. package/lib/page-title.d.cts +20 -0
  42. package/lib/page-title.js +1 -1
  43. package/lib/{page-title.vue_vue_type_style_index_0_lang-DcmGICoo.cjs → page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs} +1 -1
  44. package/lib/{page-title.vue_vue_type_style_index_0_lang-CzfdMzXf.js → page-title.vue_vue_type_style_index_0_lang-ChZot85K.js} +1 -1
  45. package/lib/register.cjs +1 -1
  46. package/lib/register.d.cts +9 -0
  47. package/lib/register.js +1 -1
  48. package/lib/style.css +1 -1
  49. package/lib/tab-content.d.cts +39 -0
  50. package/lib/tab-group.cjs +1 -1
  51. package/lib/tab-group.d.cts +44 -0
  52. package/lib/tab-group.js +1 -1
  53. package/lib/{tab-group.vue_vue_type_style_index_0_lang-CjnBkvvZ.js → tab-group.vue_vue_type_style_index_0_lang-C84mDEOC.js} +1 -1
  54. package/lib/{tab-group.vue_vue_type_style_index_0_lang-CwVGYZAo.cjs → tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs} +1 -1
  55. package/lib/types/label-preset.d.cts +12 -0
  56. package/package.json +28 -12
  57. package/src/accordion-fieldset.vue +7 -2
  58. package/src/accordion-section.vue +11 -1
  59. package/src/label-button.vue +32 -1
  60. package/src/label-icon.vue +2 -2
  61. package/src/page-section.vue +2 -2
  62. package/src/page-title.vue +5 -5
  63. package/src/tab-content.vue +7 -7
  64. package/src/tab-group.vue +27 -16
  65. package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-Dd8HXuVm.cjs +0 -1
  66. package/lib/components-YAonMRcW.cjs +0 -1
  67. package/lib/label-button.vue_vue_type_script_setup_true_lang-DqhdCgmJ.cjs +0 -1
package/README.md CHANGED
@@ -19,7 +19,7 @@ yarn add @digitalwalletcorp/vue-core @digitalwalletcorp/vue-svg-icons
19
19
  > ##### ⚠️ Requirements
20
20
  >
21
21
  > * **Vue 3.5.29+**: Props are typed with Vue's `ClassValue`, which is exported since Vue 3.5.29.
22
- > * **@digitalwalletcorp/vue-svg-icons 1.13.0+**: A peer dependency for component icons. Installing it alongside `vue-core` ensures a single shared copy of the icon package in your application.
22
+ > * **@digitalwalletcorp/vue-svg-icons 1.15.3+**: Used for the icons in components.
23
23
 
24
24
  #### 📖 Usage
25
25
 
@@ -95,16 +95,27 @@ export default defineNuxtConfig({
95
95
 
96
96
  ##### ⚙️ Adapting to your application
97
97
 
98
- The components do not know your application's theme. Colors are referenced through `--dwui-*` CSS variables with fallbacks, and default styles have zero specificity (`:where()`).
99
- We recommend keeping a `vue-core-variables.css` in your application that connects your application's variables to the `--dwui-*` variables, and loading it after the stylesheets above. The variables of each component are listed in its document.
98
+ **🎨 Dark Mode & Theme Support**
99
+
100
+ Components automatically adapt to your application's color-scheme (supporting both light and dark modes natively).
101
+
102
+ - **Follow OS Setting:** Add `:root { color-scheme: light dark; }` to your global CSS.
103
+ - **Custom Theme Switching:** Change the CSS `color-scheme` property on `:root` or a parent container (e.g., `color-scheme: dark`). The components will switch automatically.
104
+ - **No Theme Switching:** If you don't specify `color-scheme`, the components will be displayed in light mode.
105
+
106
+ **🛠️ Customizing Styles (`--dwui-*` Variables)**
107
+
108
+ Default styles use CSS variables (`--dwui-*`) and zero-specificity selectors (`:where()`), making them easy to override. The variables of each component are listed in its document.
109
+
110
+ We recommend creating a `dwui-variables.css` file to map your application's design tokens to the library's `--dwui-*` variables, and importing it after the library stylesheet. If you use both `vue-forms` and `vue-core`, you can use a single `dwui-variables.css` file for both libraries, as they share common variables like those for focus rings.
100
111
 
101
112
  ```css
102
- /* vue-core-variables.css */
113
+ /* dwui-variables.css */
103
114
  :root {
104
- --dwui-tab-header-bg: var(--app-tab-header-background);
105
- --dwui-tab-header-text: var(--app-tab-header-text);
106
- --dwui-tab-header-selected-bg: var(--app-tab-header-selected-background);
107
- --dwui-tab-header-selected-text: var(--app-tab-header-selected-text);
115
+ --dwui-background-tab-header: var(--app-tab-header-background);
116
+ --dwui-color-text-tab-header: var(--app-tab-header-text);
117
+ --dwui-background-tab-header-selected: var(--app-tab-header-selected-background);
118
+ --dwui-color-text-tab-header-selected: var(--app-tab-header-selected-text);
108
119
  }
109
120
  ```
110
121
 
@@ -115,7 +126,7 @@ export default defineNuxtConfig({
115
126
  '@digitalwalletcorp/vue-core/style.css',
116
127
  '@digitalwalletcorp/vue-svg-icons/style.css',
117
128
  '@/assets/css/default.css', // your global CSS
118
- '@/assets/css/vue-core-variables.css'
129
+ '@/assets/css/dwui-variables.css'
119
130
  ]
120
131
  });
121
132
  ```
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordion-fieldset.vue_vue_type_style_index_0_lang-Dd8HXuVm.cjs");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs");exports.default=e._sfc_main;
@@ -0,0 +1,25 @@
1
+ interface Props {
2
+ /** 凡例の文字。HTMLを含める場合は#legendスロットを使う */
3
+ legend?: string;
4
+ /** trueの場合、fieldsetを無効にする */
5
+ disabled?: boolean;
6
+ /** trueの場合、開いた状態で表示する デフォルト false */
7
+ initialExpand?: boolean;
8
+ }
9
+ interface Slots {
10
+ /** 凡例の文字の前に表示するアイコン */
11
+ icon?(): unknown;
12
+ /** 凡例。legendより優先する */
13
+ legend?(): unknown;
14
+ default?(): unknown;
15
+ }
16
+ type __VLS_Slots = Slots;
17
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./accordion-fieldset.vue_vue_type_style_index_0_lang-tzJhLHyT.js";
1
+ import { _ as f } from "./accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as f, useSlots as m, ref as g, reactive as x, onMounted as _, openBlock as i, createElementBlock as k, createElementVNode as d, createVNode as C, unref as s, createBlock as b, createSlots as y, withCtx as r, renderSlot as l, createTextVNode as h, toDisplayString as w, createCommentVNode as B, normalizeClass as S } from "vue";
1
+ import { defineComponent as f, useSlots as m, ref as g, reactive as _, onMounted as x, openBlock as i, createElementBlock as k, createElementVNode as d, createVNode as C, unref as s, createBlock as b, createSlots as h, withCtx as r, renderSlot as l, createTextVNode as w, toDisplayString as y, createCommentVNode as B, normalizeClass as S } from "vue";
2
2
  import { SvgTriangleButton as v } from "@digitalwalletcorp/vue-svg-icons";
3
- import { _ as E } from "./label-icon.vue_vue_type_style_index_0_lang-bQFkQ_gC.js";
3
+ import { _ as E } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
4
4
  import { u as N } from "./use-shrinkable-CS2bmsJJ.js";
5
- const V = ["disabled"], $ = ["aria-expanded"], q = /* @__PURE__ */ f({
5
+ const V = ["disabled"], $ = { class: "dwui-accordion-legend" }, T = ["aria-expanded"], A = /* @__PURE__ */ f({
6
6
  __name: "accordion-fieldset",
7
7
  props: {
8
8
  legend: {},
@@ -10,18 +10,18 @@ const V = ["disabled"], $ = ["aria-expanded"], q = /* @__PURE__ */ f({
10
10
  initialExpand: { type: Boolean }
11
11
  },
12
12
  setup(c) {
13
- const n = c, o = m(), a = g(), e = x({
13
+ const n = c, o = m(), a = g(), e = _({
14
14
  expanded: !0
15
15
  }), p = N(a), u = () => {
16
16
  e.expanded = !e.expanded;
17
17
  };
18
- return _(() => {
18
+ return x(() => {
19
19
  e.expanded = !!n.initialExpand;
20
- }), (t, T) => (i(), k("fieldset", {
20
+ }), (t, z) => (i(), k("fieldset", {
21
21
  class: "dwui-accordion-fieldset",
22
22
  disabled: n.disabled
23
23
  }, [
24
- d("legend", null, [
24
+ d("legend", $, [
25
25
  d("button", {
26
26
  type: "button",
27
27
  class: "dwui-accordion-toggle",
@@ -31,7 +31,7 @@ const V = ["disabled"], $ = ["aria-expanded"], q = /* @__PURE__ */ f({
31
31
  C(s(v), {
32
32
  direction: e.expanded ? "up" : "down"
33
33
  }, null, 8, ["direction"]),
34
- n.legend != null || o.legend != null || o.icon != null ? (i(), b(E, { key: 0 }, y({ _: 2 }, [
34
+ n.legend != null || o.legend != null || o.icon != null ? (i(), b(E, { key: 0 }, h({ _: 2 }, [
35
35
  o.icon != null ? {
36
36
  name: "icon",
37
37
  fn: r(() => [
@@ -43,13 +43,13 @@ const V = ["disabled"], $ = ["aria-expanded"], q = /* @__PURE__ */ f({
43
43
  name: "default",
44
44
  fn: r(() => [
45
45
  l(t.$slots, "legend", {}, () => [
46
- h(w(n.legend), 1)
46
+ w(y(n.legend), 1)
47
47
  ])
48
48
  ]),
49
49
  key: "1"
50
50
  } : void 0
51
51
  ]), 1024)) : B("", !0)
52
- ], 8, $)
52
+ ], 8, T)
53
53
  ]),
54
54
  d("div", {
55
55
  ref_key: "refContents",
@@ -62,5 +62,5 @@ const V = ["disabled"], $ = ["aria-expanded"], q = /* @__PURE__ */ f({
62
62
  }
63
63
  });
64
64
  export {
65
- q as _
65
+ A as _
66
66
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),c=require("@digitalwalletcorp/vue-svg-icons"),r=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),u=require("./use-shrinkable-Cu9JQZll.cjs"),p=["disabled"],_={class:"dwui-accordion-legend"},g=["aria-expanded"],f=e.defineComponent({__name:"accordion-fieldset",props:{legend:{},disabled:{type:Boolean},initialExpand:{type:Boolean}},setup(s){const t=s,o=e.useSlots(),l=e.ref(),n=e.reactive({expanded:!0}),a=u.useShrinkable(l),i=()=>{n.expanded=!n.expanded};return e.onMounted(()=>{n.expanded=!!t.initialExpand}),(d,x)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"dwui-accordion-fieldset",disabled:t.disabled},[e.createElementVNode("legend",_,[e.createElementVNode("button",{type:"button",class:"dwui-accordion-toggle","aria-expanded":n.expanded,onClick:i},[e.createVNode(e.unref(c.SvgTriangleButton),{direction:n.expanded?"up":"down"},null,8,["direction"]),t.legend!=null||o.legend!=null||o.icon!=null?(e.openBlock(),e.createBlock(r._sfc_main,{key:0},e.createSlots({_:2},[o.icon!=null?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"icon")]),key:"0"}:void 0,t.legend!=null||o.legend!=null?{name:"default",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"legend",{},()=>[e.createTextVNode(e.toDisplayString(t.legend),1)])]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0)],8,g)]),e.createElementVNode("div",{ref_key:"refContents",ref:l,class:e.normalizeClass(["dwui-accordion-contents",e.unref(a)?n.expanded?"dwui-expanded":"dwui-shrunk":""])},[e.renderSlot(d.$slots,"default")],2)],8,p))}});exports._sfc_main=f;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordion-section.vue_vue_type_style_index_0_lang-BBEywIH3.cjs");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs");exports.default=e._sfc_main;
@@ -0,0 +1,34 @@
1
+ import { LabelPreset } from './types/label-preset.cjs';
2
+ interface Props {
3
+ /** trueの場合、開閉ボタンを無効にする */
4
+ disabled?: boolean;
5
+ /** trueの場合、開いた状態で表示する デフォルト false */
6
+ initialExpand?: boolean;
7
+ /** trueの場合、縮めたときに中身の下側をぼかさない */
8
+ noGradient?: boolean;
9
+ /** 縮めているときの開閉ボタン(開く)のラベル */
10
+ openLabel?: string;
11
+ /** 開いているときの開閉ボタン(閉じる)のラベル */
12
+ closeLabel?: string;
13
+ /** 縮めているときの開閉ボタン(開く)のアイコンとラベル */
14
+ openPreset?: LabelPreset;
15
+ /** 開いているときの開閉ボタン(閉じる)のアイコンとラベル */
16
+ closePreset?: LabelPreset;
17
+ }
18
+ interface Slots {
19
+ /** 縮めているときの開閉ボタン(開く)のアイコン */
20
+ 'open-icon'?(): unknown;
21
+ /** 開いているときの開閉ボタン(閉じる)のアイコン */
22
+ 'close-icon'?(): unknown;
23
+ default?(): unknown;
24
+ }
25
+ type __VLS_Slots = Slots;
26
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./accordion-section.vue_vue_type_style_index_0_lang-DAlUN0wH.js";
1
+ import { _ as f } from "./accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),k=require("@digitalwalletcorp/vue-svg-icons"),v=require("./label-icon.vue_vue_type_style_index_0_lang-C2URq6GP.cjs"),x=require("./use-shrinkable-Cu9JQZll.cjs"),f={class:"dwui-accordion-section"},g={key:0,class:"dwui-accordion-section-control"},m=["disabled","aria-expanded"],b=e.defineComponent({__name:"accordion-section",props:{disabled:{type:Boolean},initialExpand:{type:Boolean},noGradient:{type:Boolean},openLabel:{},closeLabel:{},openPreset:{},closePreset:{}},setup(u){const o=u,l=e.useSlots(),r=e.ref(),n=e.reactive({expanded:!0}),d=x.useShrinkable(r),s=e.computed(()=>n.expanded?o.closePreset:o.openPreset),a=()=>(n.expanded?l["close-icon"]:l["open-icon"])??s.value?.icon,p=()=>(n.expanded?l["close-icon"]:l["open-icon"])==null?s.value?.iconProps:void 0,i=e.computed(()=>{const t=n.expanded?o.closeLabel:o.openLabel;if(t!=null)return t;const c=s.value?.label;return typeof c=="function"?c():c}),_=()=>{n.expanded=!n.expanded};return e.onMounted(()=>{n.expanded=!!o.initialExpand}),(t,c)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",{ref_key:"refContents",ref:r,class:e.normalizeClass(["dwui-accordion-section-contents",[e.unref(d)?n.expanded?"dwui-expanded":"dwui-shrunk":"",{"dwui-no-gradient":o.noGradient}]])},[e.renderSlot(t.$slots,"default")],2),e.unref(d)?(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("button",{type:"button",class:"dwui-accordion-section-toggle",disabled:o.disabled,"aria-expanded":n.expanded,onClick:e.withModifiers(_,["stop"])},[a()!=null||i.value!=null?(e.openBlock(),e.createBlock(v._sfc_main,{key:0},e.createSlots({_:2},[a()!=null?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a()),e.normalizeProps(e.guardReactiveProps(p())),null,16))]),key:"0"}:void 0,i.value!=null?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),key:"1"}:void 0]),1024)):(e.openBlock(),e.createBlock(e.unref(k.SvgTriangleButton),{key:1,direction:n.expanded?"up":"down"},null,8,["direction"]))],8,m)])):e.createCommentVNode("",!0)]))}});exports._sfc_main=b;
1
+ "use strict";const e=require("vue"),k=require("@digitalwalletcorp/vue-svg-icons"),v=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),x=require("./use-shrinkable-Cu9JQZll.cjs"),f={class:"dwui-accordion-section"},g={key:0,class:"dwui-accordion-section-control"},m=["disabled","aria-expanded"],b=e.defineComponent({__name:"accordion-section",props:{disabled:{type:Boolean},initialExpand:{type:Boolean},noGradient:{type:Boolean},openLabel:{},closeLabel:{},openPreset:{},closePreset:{}},setup(u){const o=u,l=e.useSlots(),r=e.ref(),n=e.reactive({expanded:!0}),d=x.useShrinkable(r),s=e.computed(()=>n.expanded?o.closePreset:o.openPreset),a=()=>(n.expanded?l["close-icon"]:l["open-icon"])??s.value?.icon,p=()=>(n.expanded?l["close-icon"]:l["open-icon"])==null?s.value?.iconProps:void 0,i=e.computed(()=>{const t=n.expanded?o.closeLabel:o.openLabel;if(t!=null)return t;const c=s.value?.label;return typeof c=="function"?c():c}),_=()=>{n.expanded=!n.expanded};return e.onMounted(()=>{n.expanded=!!o.initialExpand}),(t,c)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",{ref_key:"refContents",ref:r,class:e.normalizeClass(["dwui-accordion-section-contents",[e.unref(d)?n.expanded?"dwui-expanded":"dwui-shrunk":"",{"dwui-no-gradient":o.noGradient}]])},[e.renderSlot(t.$slots,"default")],2),e.unref(d)?(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("button",{type:"button",class:"dwui-accordion-section-toggle",disabled:o.disabled,"aria-expanded":n.expanded,onClick:e.withModifiers(_,["stop"])},[a()!=null||i.value!=null?(e.openBlock(),e.createBlock(v._sfc_main,{key:0},e.createSlots({_:2},[a()!=null?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a()),e.normalizeProps(e.guardReactiveProps(p())),null,16))]),key:"0"}:void 0,i.value!=null?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),key:"1"}:void 0]),1024)):(e.openBlock(),e.createBlock(e.unref(k.SvgTriangleButton),{key:1,direction:n.expanded?"up":"down"},null,8,["direction"]))],8,m)])):e.createCommentVNode("",!0)]))}});exports._sfc_main=b;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as k, useSlots as y, ref as w, reactive as C, computed as m, onMounted as h, openBlock as t, createElementBlock as f, createElementVNode as x, normalizeClass as P, unref as d, renderSlot as B, withModifiers as L, createBlock as r, createSlots as S, withCtx as g, resolveDynamicComponent as E, normalizeProps as N, guardReactiveProps as T, createTextVNode as V, toDisplayString as z, createCommentVNode as D } from "vue";
2
2
  import { SvgTriangleButton as G } from "@digitalwalletcorp/vue-svg-icons";
3
- import { _ as I } from "./label-icon.vue_vue_type_style_index_0_lang-bQFkQ_gC.js";
3
+ import { _ as I } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
4
4
  import { u as M } from "./use-shrinkable-CS2bmsJJ.js";
5
5
  const $ = { class: "dwui-accordion-section" }, R = {
6
6
  key: 0,
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs"),_=require("./accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs"),n=require("./hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs"),t=require("./label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs"),i=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),o=require("./page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs"),a=require("./page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs"),c=require("./tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs"),s=require("./tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs"),u=Object.freeze(Object.defineProperty({__proto__:null,AccordionFieldset:e._sfc_main,AccordionSection:_._sfc_main,HourglassLoading:n._sfc_main,LabelButton:t._sfc_main,LabelIcon:i._sfc_main,PageSection:o._sfc_main,PageTitle:a._sfc_main,TabContent:c._sfc_main,TabGroup:s._sfc_main},Symbol.toStringTag,{value:"Module"}));exports.components=u;
@@ -1,12 +1,12 @@
1
- import { _ as o } from "./accordion-fieldset.vue_vue_type_style_index_0_lang-tzJhLHyT.js";
2
- import { _ } from "./accordion-section.vue_vue_type_style_index_0_lang-DAlUN0wH.js";
1
+ import { _ as o } from "./accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js";
2
+ import { _ } from "./accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js";
3
3
  import { _ as a } from "./hourglass-loading.vue_vue_type_style_index_0_lang-DkUGIxQ2.js";
4
- import { _ as m } from "./label-button.vue_vue_type_script_setup_true_lang-CoHrTUSs.js";
5
- import { _ as r } from "./label-icon.vue_vue_type_style_index_0_lang-bQFkQ_gC.js";
6
- import { _ as i } from "./page-section.vue_vue_type_style_index_0_lang-4MLb_sDZ.js";
7
- import { _ as t } from "./page-title.vue_vue_type_style_index_0_lang-CzfdMzXf.js";
4
+ import { _ as m } from "./label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js";
5
+ import { _ as r } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
6
+ import { _ as i } from "./page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js";
7
+ import { _ as t } from "./page-title.vue_vue_type_style_index_0_lang-ChZot85K.js";
8
8
  import { _ as n } from "./tab-content.vue_vue_type_style_index_0_lang-CcQLHmIF.js";
9
- import { _ as s } from "./tab-group.vue_vue_type_style_index_0_lang-CjnBkvvZ.js";
9
+ import { _ as s } from "./tab-group.vue_vue_type_style_index_0_lang-C84mDEOC.js";
10
10
  const u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11
11
  __proto__: null,
12
12
  AccordionFieldset: o,
@@ -0,0 +1,9 @@
1
+ export { default as AccordionFieldset } from './accordion-fieldset.cjs';
2
+ export { default as AccordionSection } from './accordion-section.cjs';
3
+ export { default as HourglassLoading } from './hourglass-loading.cjs';
4
+ export { default as LabelButton } from './label-button.cjs';
5
+ export { default as LabelIcon } from './label-icon.cjs';
6
+ export { default as PageSection } from './page-section.cjs';
7
+ export { default as PageTitle } from './page-title.cjs';
8
+ export { default as TabContent } from './tab-content.cjs';
9
+ export { default as TabGroup } from './tab-group.cjs';
@@ -0,0 +1,7 @@
1
+ type VueCoreComponents = typeof import('./components.cjs');
2
+
3
+ declare module 'vue' {
4
+ interface GlobalComponents extends VueCoreComponents {}
5
+ }
6
+
7
+ export {};
@@ -0,0 +1,23 @@
1
+ interface Props {
2
+ /** ローディング表示するか */
3
+ loading: boolean;
4
+ /** 砂が落ち切るまでの秒数。未指定ならSvgHourglassの既定値に任せる */
5
+ duration?: number;
6
+ /** 表示サイズ(高さ)。数値はpxとして扱う */
7
+ size?: number | string;
8
+ }
9
+ declare var __VLS_8: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_8) => any;
12
+ };
13
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
14
+ size: number | string;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./accordion-fieldset.vue_vue_type_style_index_0_lang-Dd8HXuVm.cjs"),_=require("./accordion-section.vue_vue_type_style_index_0_lang-BBEywIH3.cjs"),n=require("./hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs"),t=require("./label-button.vue_vue_type_script_setup_true_lang-DqhdCgmJ.cjs"),i=require("./label-icon.vue_vue_type_style_index_0_lang-C2URq6GP.cjs"),a=require("./page-section.vue_vue_type_style_index_0_lang-bvQeBjUP.cjs"),u=require("./page-title.vue_vue_type_style_index_0_lang-DcmGICoo.cjs"),o=require("./tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs"),s=require("./tab-group.vue_vue_type_style_index_0_lang-CwVGYZAo.cjs");exports.AccordionFieldset=e._sfc_main;exports.AccordionSection=_._sfc_main;exports.HourglassLoading=n._sfc_main;exports.LabelButton=t._sfc_main;exports.LabelIcon=i._sfc_main;exports.PageSection=a._sfc_main;exports.PageTitle=u._sfc_main;exports.TabContent=o._sfc_main;exports.TabGroup=s._sfc_main;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs"),_=require("./accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs"),n=require("./hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs"),t=require("./label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs"),i=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),a=require("./page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs"),o=require("./page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs"),u=require("./tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs"),s=require("./tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs");exports.AccordionFieldset=e._sfc_main;exports.AccordionSection=_._sfc_main;exports.HourglassLoading=n._sfc_main;exports.LabelButton=t._sfc_main;exports.LabelIcon=i._sfc_main;exports.PageSection=a._sfc_main;exports.PageTitle=o._sfc_main;exports.TabContent=u._sfc_main;exports.TabGroup=s._sfc_main;
@@ -0,0 +1,3 @@
1
+ export * from './components.cjs';
2
+ export type { LabelPreset } from './types/label-preset.cjs';
3
+ export type { TabContentStatus } from './internal/tab-group-context.cjs';
package/lib/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { _ as e } from "./accordion-fieldset.vue_vue_type_style_index_0_lang-tzJhLHyT.js";
2
- import { _ as t } from "./accordion-section.vue_vue_type_style_index_0_lang-DAlUN0wH.js";
1
+ import { _ as e } from "./accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js";
2
+ import { _ as t } from "./accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js";
3
3
  import { _ as p } from "./hourglass-loading.vue_vue_type_style_index_0_lang-DkUGIxQ2.js";
4
- import { _ as m } from "./label-button.vue_vue_type_script_setup_true_lang-CoHrTUSs.js";
5
- import { _ as x } from "./label-icon.vue_vue_type_style_index_0_lang-bQFkQ_gC.js";
6
- import { _ as c } from "./page-section.vue_vue_type_style_index_0_lang-4MLb_sDZ.js";
7
- import { _ as l } from "./page-title.vue_vue_type_style_index_0_lang-CzfdMzXf.js";
4
+ import { _ as m } from "./label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js";
5
+ import { _ as x } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
6
+ import { _ as c } from "./page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js";
7
+ import { _ as l } from "./page-title.vue_vue_type_style_index_0_lang-ChZot85K.js";
8
8
  import { _ as d } from "./tab-content.vue_vue_type_style_index_0_lang-CcQLHmIF.js";
9
- import { _ as u } from "./tab-group.vue_vue_type_style_index_0_lang-CjnBkvvZ.js";
9
+ import { _ as u } from "./tab-group.vue_vue_type_style_index_0_lang-C84mDEOC.js";
10
10
  export {
11
11
  e as AccordionFieldset,
12
12
  t as AccordionSection,
@@ -0,0 +1,16 @@
1
+ import { ComputedRef, InjectionKey, Ref, Slot } from 'vue';
2
+ /** タブの見出しの状態 */
3
+ export type TabContentStatus = 'warn' | 'error';
4
+ /**
5
+ * TabGroupからTabContentへ渡す状態
6
+ * TabGroupとTabContentの間だけで使い、利用側には公開しない
7
+ */
8
+ export interface TabGroupContext {
9
+ /** 選択中のタブのlabelId */
10
+ activeLabelId: ComputedRef<string | undefined>;
11
+ /** TabGroupがマウント済みか */
12
+ mounted: Ref<boolean>;
13
+ /** TabGroupの#loadingスロット。未指定ならTabContentは既定の読み込み中表示を出す */
14
+ loadingSlot: () => Slot | undefined;
15
+ }
16
+ export declare const tabGroupContextKey: InjectionKey<TabGroupContext>;
@@ -0,0 +1,12 @@
1
+ import { Ref } from 'vue';
2
+ /** 縮めたときの中身の高さ(px)。中身がこれより低い場合は開閉しない */
3
+ export declare const SHRUNK_HEIGHT = 70;
4
+ /**
5
+ * 中身が縮めたときの高さ以上あり、開閉できるかを返す
6
+ * 中身の大きさが変わるたびに測り直すため、隠れたタブの中にあって後から表示された場合や、中身が増減した場合も再判定される
7
+ * 縮めている間も中身の本来の高さで判定する
8
+ *
9
+ * @param {Ref<HTMLElement | undefined>} contents 開閉する中身の要素
10
+ * @returns {Ref<boolean>}
11
+ */
12
+ export declare function useShrinkable(contents: Ref<HTMLElement | undefined>): Ref<boolean>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./label-button.vue_vue_type_script_setup_true_lang-DqhdCgmJ.cjs");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs");exports.default=e._sfc_main;
@@ -0,0 +1,30 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ import { LabelPreset } from './types/label-preset.cjs';
3
+ interface Props {
4
+ /** アイコンとラベルの組み合わせ */
5
+ preset?: LabelPreset;
6
+ /** アイコンとラベルの間隔。未指定ならLabelIconの既定値(0.25em) */
7
+ gap?: string;
8
+ /** presetのアイコンに付けるclass。スロットで渡したアイコンには、スロット側で直接指定する */
9
+ iconClass?: ClassValue;
10
+ /** presetのアイコンに付けるstyle。スロットで渡したアイコンには、スロット側で直接指定する */
11
+ iconStyle?: StyleValue;
12
+ /** ラベルに付けるclass */
13
+ labelClass?: ClassValue;
14
+ /** ラベルに付けるstyle */
15
+ labelStyle?: StyleValue;
16
+ }
17
+ interface Slots {
18
+ icon?(): unknown;
19
+ default?(): unknown;
20
+ }
21
+ type __VLS_Slots = Slots;
22
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./label-button.vue_vue_type_script_setup_true_lang-CoHrTUSs.js";
1
+ import { _ as f } from "./label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),o=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),a={class:"dwui-label-button"},c=e.defineComponent({__name:"label-button",props:{preset:{},gap:{},iconClass:{type:[Boolean,null,String,Object,Array]},iconStyle:{type:[Boolean,null,String,Object,Array]},labelClass:{type:[Boolean,null,String,Object,Array]},labelStyle:{type:[Boolean,null,String,Object,Array]}},setup(s){const l=s,t=e.useSlots();return(n,r)=>(e.openBlock(),e.createElementBlock("button",a,[e.createVNode(o._sfc_main,{preset:l.preset,gap:l.gap,"icon-class":l.iconClass,"icon-style":l.iconStyle,"label-class":l.labelClass,"label-style":l.labelStyle},e.createSlots({_:2},[t.icon!=null?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"icon")]),key:"0"}:void 0,t.default!=null?{name:"default",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),key:"1"}:void 0]),1032,["preset","gap","icon-class","icon-style","label-class","label-style"])]))}});exports._sfc_main=c;
@@ -1,6 +1,6 @@
1
- import { defineComponent as s, useSlots as r, openBlock as c, createElementBlock as i, createVNode as p, createSlots as y, withCtx as n, renderSlot as o } from "vue";
2
- import { _ as u } from "./label-icon.vue_vue_type_style_index_0_lang-bQFkQ_gC.js";
3
- const f = /* @__PURE__ */ s({
1
+ import { defineComponent as a, useSlots as c, openBlock as r, createElementBlock as i, createVNode as p, createSlots as y, withCtx as o, renderSlot as n } from "vue";
2
+ import { _ as b } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
3
+ const u = { class: "dwui-label-button" }, d = /* @__PURE__ */ a({
4
4
  __name: "label-button",
5
5
  props: {
6
6
  preset: {},
@@ -10,10 +10,10 @@ const f = /* @__PURE__ */ s({
10
10
  labelClass: { type: [Boolean, null, String, Object, Array] },
11
11
  labelStyle: { type: [Boolean, null, String, Object, Array] }
12
12
  },
13
- setup(a) {
14
- const e = a, l = r();
15
- return (t, b) => (c(), i("button", null, [
16
- p(u, {
13
+ setup(s) {
14
+ const e = s, l = c();
15
+ return (t, m) => (r(), i("button", u, [
16
+ p(b, {
17
17
  preset: e.preset,
18
18
  gap: e.gap,
19
19
  "icon-class": e.iconClass,
@@ -23,15 +23,15 @@ const f = /* @__PURE__ */ s({
23
23
  }, y({ _: 2 }, [
24
24
  l.icon != null ? {
25
25
  name: "icon",
26
- fn: n(() => [
27
- o(t.$slots, "icon")
26
+ fn: o(() => [
27
+ n(t.$slots, "icon")
28
28
  ]),
29
29
  key: "0"
30
30
  } : void 0,
31
31
  l.default != null ? {
32
32
  name: "default",
33
- fn: n(() => [
34
- o(t.$slots, "default")
33
+ fn: o(() => [
34
+ n(t.$slots, "default")
35
35
  ]),
36
36
  key: "1"
37
37
  } : void 0
@@ -40,5 +40,5 @@ const f = /* @__PURE__ */ s({
40
40
  }
41
41
  });
42
42
  export {
43
- f as _
43
+ d as _
44
44
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./label-icon.vue_vue_type_style_index_0_lang-C2URq6GP.cjs");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs");exports.default=e._sfc_main;
@@ -0,0 +1,30 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ import { LabelPreset } from './types/label-preset.cjs';
3
+ interface Props {
4
+ /** アイコンとラベルの組み合わせ */
5
+ preset?: LabelPreset;
6
+ /** アイコンとラベルの間隔。未指定なら既定値(0.25em) */
7
+ gap?: string;
8
+ /** presetのアイコンに付けるclass。スロットで渡したアイコンには、スロット側で直接指定する */
9
+ iconClass?: ClassValue;
10
+ /** presetのアイコンに付けるstyle。スロットで渡したアイコンには、スロット側で直接指定する */
11
+ iconStyle?: StyleValue;
12
+ /** ラベルに付けるclass */
13
+ labelClass?: ClassValue;
14
+ /** ラベルに付けるstyle */
15
+ labelStyle?: StyleValue;
16
+ }
17
+ interface Slots {
18
+ icon?(): unknown;
19
+ default?(): unknown;
20
+ }
21
+ type __VLS_Slots = Slots;
22
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
package/lib/label-icon.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./label-icon.vue_vue_type_style_index_0_lang-bQFkQ_gC.js";
1
+ import { _ as f } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),s=e.defineComponent({__name:"label-icon",props:{preset:{},gap:{},iconClass:{type:[Boolean,null,String,Object,Array]},iconStyle:{type:[Boolean,null,String,Object,Array]},labelClass:{type:[Boolean,null,String,Object,Array]},labelStyle:{type:[Boolean,null,String,Object,Array]}},setup(n){const l=n,o=e.useSlots();return(t,a)=>(e.openBlock(),e.createElementBlock("span",{class:"dwui-label-icon",style:e.normalizeStyle(l.gap==null?void 0:{"--dwui-label-icon-gap":l.gap})},[e.renderSlot(t.$slots,"icon",{},()=>[l.preset!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.preset.icon),e.mergeProps({key:0},l.preset.iconProps,{class:l.iconClass,style:l.iconStyle}),null,16,["class","style"])):e.createCommentVNode("",!0)]),o.default!=null||l.preset!=null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dwui-label",l.labelClass]),style:e.normalizeStyle(l.labelStyle)},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(typeof l.preset?.label=="function"?l.preset.label():l.preset?.label),1)])],6)):e.createCommentVNode("",!0)],4))}});exports._sfc_main=s;
1
+ "use strict";const e=require("vue"),s=e.defineComponent({__name:"label-icon",props:{preset:{},gap:{},iconClass:{type:[Boolean,null,String,Object,Array]},iconStyle:{type:[Boolean,null,String,Object,Array]},labelClass:{type:[Boolean,null,String,Object,Array]},labelStyle:{type:[Boolean,null,String,Object,Array]}},setup(n){const l=n,o=e.useSlots();return(t,a)=>(e.openBlock(),e.createElementBlock("span",{class:"dwui-label-icon",style:e.normalizeStyle(l.gap==null?void 0:{"--dwui-gap-label-icon":l.gap})},[e.renderSlot(t.$slots,"icon",{},()=>[l.preset!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.preset.icon),e.mergeProps({key:0},l.preset.iconProps,{class:l.iconClass,style:l.iconStyle}),null,16,["class","style"])):e.createCommentVNode("",!0)]),o.default!=null||l.preset!=null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dwui-label",l.labelClass]),style:e.normalizeStyle(l.labelStyle)},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(typeof l.preset?.label=="function"?l.preset.label():l.preset?.label),1)])],6)):e.createCommentVNode("",!0)],4))}});exports._sfc_main=s;
@@ -13,7 +13,7 @@ const f = /* @__PURE__ */ p({
13
13
  const e = r, c = i();
14
14
  return (t, g) => (l(), s("span", {
15
15
  class: "dwui-label-icon",
16
- style: n(e.gap == null ? void 0 : { "--dwui-label-icon-gap": e.gap })
16
+ style: n(e.gap == null ? void 0 : { "--dwui-gap-label-icon": e.gap })
17
17
  }, [
18
18
  o(t.$slots, "icon", {}, () => [
19
19
  e.preset != null ? (l(), y(u(e.preset.icon), b({ key: 0 }, e.preset.iconProps, {
package/lib/nuxt.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@nuxt/kit"),r=require("./components-YAonMRcW.cjs");var t=typeof document<"u"?document.currentScript:null;const u=e.defineNuxtModule({meta:{name:"@digitalwalletcorp/vue-core",configKey:"vueCore"},setup(){const n=e.createResolver(typeof document>"u"?require("url").pathToFileURL(__filename).href:t&&t.tagName.toUpperCase()==="SCRIPT"&&t.src||new URL("nuxt.cjs",document.baseURI).href);for(const o of Object.keys(r.components))e.addComponent({name:o,export:o,filePath:n.resolve("./index")})}});exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@nuxt/kit"),r=require("./components-C63HJoCn.cjs");var t=typeof document<"u"?document.currentScript:null;const u=e.defineNuxtModule({meta:{name:"@digitalwalletcorp/vue-core",configKey:"vueCore"},setup(){const n=e.createResolver(typeof document>"u"?require("url").pathToFileURL(__filename).href:t&&t.tagName.toUpperCase()==="SCRIPT"&&t.src||new URL("nuxt.cjs",document.baseURI).href);for(const o of Object.keys(r.components))e.addComponent({name:o,export:o,filePath:n.resolve("./index")})}});exports.default=u;
package/lib/nuxt.d.cts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * コンポーネントをNuxtのコンポーネント自動importへ登録するモジュール。
3
+ * グローバル登録(registerComponents)と違い、テンプレートで使ったコンポーネントだけがバンドルされ、
4
+ * 型は Nuxt が .nuxt/components.d.ts へ生成するため、利用側に型定義は要らない。
5
+ *
6
+ * 名前の一覧を得るためだけに ./components をimportしている。
7
+ * このモジュールはビルド時にNuxtが読み込むもので、アプリの実行時バンドルには入らない
8
+ */
9
+ declare const _default: import('@nuxt/schema').NuxtModule<import('@nuxt/schema').ModuleOptions, import('@nuxt/schema').ModuleOptions, false>;
10
+ export default _default;
package/lib/nuxt.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtModule as t, createResolver as r, addComponent as n } from "@nuxt/kit";
2
- import { c as a } from "./components-xNQBXMzx.js";
2
+ import { c as a } from "./components-q4Cf97bO.js";
3
3
  const c = t({
4
4
  meta: {
5
5
  name: "@digitalwalletcorp/vue-core",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./page-section.vue_vue_type_style_index_0_lang-bvQeBjUP.cjs");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs");exports.default=e._sfc_main;
@@ -0,0 +1,34 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ /** 見出しのアイコンとして選べるもの */
3
+ type PageSectionIcon = 'diamond' | 'circle' | 'square' | 'pushpin' | 'round-pushpin';
4
+ interface Props {
5
+ /** 見出しの文字。未指定なら見出しを表示しない */
6
+ title?: string;
7
+ /** 見出しのアイコン。これ以外のアイコンは#iconスロットで渡す デフォルト 'diamond' */
8
+ icon?: PageSectionIcon;
9
+ /** diamond・circle・squareの大きさ。未指定ならアイコンの既定値(large) */
10
+ iconVariant?: 'large' | 'medium' | 'small';
11
+ /** diamond・circle・squareの色。未指定ならdiamondは#1a44b6、circleは#e78b2f、squareは#d13a2b */
12
+ iconColor?: string;
13
+ /** 見出しに付けるclass */
14
+ titleClass?: ClassValue;
15
+ /** 見出しに付けるstyle */
16
+ titleStyle?: StyleValue;
17
+ }
18
+ interface Slots {
19
+ /** 見出しの文字の前に表示するアイコン。iconより優先する */
20
+ icon?(): unknown;
21
+ default?(): unknown;
22
+ }
23
+ type __VLS_Slots = Slots;
24
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
25
+ icon: PageSectionIcon;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./page-section.vue_vue_type_style_index_0_lang-4MLb_sDZ.js";
1
+ import { _ as f } from "./page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js";
2
2
  export {
3
3
  f as default
4
4
  };