@fastkit/vui 0.6.28 → 0.6.30

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.
package/dist/vui.css CHANGED
@@ -347,6 +347,15 @@ template {
347
347
  :root {
348
348
  --root-em: 16px;
349
349
  --root-spacing: 4px;
350
+ --transition-fast-out-slow-in: cubic-bezier(0.4, 0, 0.2, 1);
351
+ --transition-linear-out-slow-in: cubic-bezier(0, 0, 0.2, 1);
352
+ --transition-fast-out-linear-in: cubic-bezier(0.4, 0, 1, 1);
353
+ --transition-ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);
354
+ --transition-fast-in-fast-out: cubic-bezier(0.25, 0.8, 0.25, 1);
355
+ --transition-swing: cubic-bezier(0.25, 0.8, 0.5, 1);
356
+ --transition-primary: var(--transition-swing);
357
+ --transition-tab: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
358
+ --transition-fade: 0.2s;
350
359
  --typo-fallback-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
351
360
  "Helvetica Neue", Arial, sans-serif;
352
361
  --type-emoji-font: "Apple Color Emoji", "Segoe UI Emoji";
@@ -531,6 +540,9 @@ template {
531
540
  --table-cell-horizontal-padding: calc(var(--root-em) * 1);
532
541
  --table-header-color: var(--palette-primary);
533
542
  --table-header-font-weight: 500;
543
+ --tabs-height: calc(var(--root-em) * 3);
544
+ --tabs-bar-height: calc(var(--root-em) * 0.375);
545
+ --tabs-font-size: calc(var(--root-em) * 0.875);
534
546
  }
535
547
 
536
548
  :root,
@@ -731,6 +743,22 @@ h6,
731
743
  box-shadow: var(--shadow-key-umbra-0), var(--shadow-key-penumbra-0), var(--shadow-key-ambient-0) !important;
732
744
  }
733
745
 
746
+ code,
747
+ kbd,
748
+ pre,
749
+ samp {
750
+ font-family: monospace;
751
+ }
752
+
753
+ code {
754
+ padding: 0.2em 0.4em;
755
+ font-size: 85%;
756
+ font-weight: 400;
757
+ color: rgba(0, 0, 0, 0.87);
758
+ background-color: rgba(0, 0, 0, 0.05);
759
+ border-radius: 3px;
760
+ }
761
+
734
762
  table {
735
763
  display: table;
736
764
  max-width: 100%;
@@ -1678,6 +1706,159 @@ thead th {
1678
1706
  font-style: italic;
1679
1707
  color: var(--control-disabled-color);
1680
1708
  }
1709
+ .v-tabs {
1710
+ position: relative;
1711
+ width: 100%;
1712
+ height: var(--tabs-height);
1713
+ overflow: hidden;
1714
+ }
1715
+ .v-tabs::before {
1716
+ position: absolute;
1717
+ right: 0;
1718
+ bottom: 0;
1719
+ left: 0;
1720
+ display: block;
1721
+ height: 2px;
1722
+ content: "";
1723
+ background: currentColor;
1724
+ opacity: 0.25;
1725
+ }
1726
+ .v-tabs__scroller {
1727
+ width: 100%;
1728
+ height: calc(var(--tabs-height) + 30px);
1729
+ }
1730
+ .v-tabs__scroller__container {
1731
+ padding-bottom: 30px;
1732
+ }
1733
+ .v-tabs__content {
1734
+ position: relative;
1735
+ display: inline-flex;
1736
+ align-items: stretch;
1737
+ min-width: 100%;
1738
+ vertical-align: bottom;
1739
+ }
1740
+ .v-tab {
1741
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
1742
+ padding: 0;
1743
+ touch-action: manipulation;
1744
+ cursor: pointer;
1745
+ user-select: none;
1746
+ background-color: transparent;
1747
+ border: 0;
1748
+ outline: 0;
1749
+ appearance: none;
1750
+ --tab-content-color: var(--palette-caption);
1751
+ --tab-content-focus-color: var(--main-color);
1752
+ --tab-content-opacity: 0.7;
1753
+ position: relative;
1754
+ z-index: 3;
1755
+ display: flex;
1756
+ align-items: center;
1757
+ justify-content: center;
1758
+ height: var(--tabs-height);
1759
+ padding: 0 1.25em;
1760
+ font: inherit;
1761
+ font-size: var(--tabs-font-size);
1762
+ white-space: nowrap;
1763
+ user-select: none;
1764
+ transition: color 0.6s;
1765
+ }
1766
+ .v-tab::-moz-focus-inner {
1767
+ border: 0;
1768
+ }
1769
+ .v-tab, .v-tab:hover, .v-tab:focus {
1770
+ text-decoration: none;
1771
+ }
1772
+ .v-tab::before {
1773
+ position: absolute;
1774
+ right: 0;
1775
+ bottom: 0;
1776
+ left: 0;
1777
+ z-index: 1;
1778
+ height: 2px;
1779
+ content: "";
1780
+ background-color: var(--tab-content-focus-color);
1781
+ border-radius: inherit;
1782
+ transition: all 0.25s;
1783
+ transform: scaleX(0);
1784
+ }
1785
+ .v-tab__content {
1786
+ position: relative;
1787
+ z-index: 2;
1788
+ display: flex;
1789
+ align-items: center;
1790
+ line-height: 1.2;
1791
+ color: var(--tab-content-color);
1792
+ text-align: center;
1793
+ opacity: var(--tab-content-opacity);
1794
+ transition: all 0.25s ease;
1795
+ }
1796
+ .v-tab__icon {
1797
+ margin-right: 8px;
1798
+ font-size: 120%;
1799
+ }
1800
+ .v-tab:hover {
1801
+ --tab-content-color: var(--tab-content-focus-color);
1802
+ }
1803
+ .v-tab--active {
1804
+ --tab-content-color: rgba(0, 0, 0, 0.87);
1805
+ pointer-events: none;
1806
+ background: var(--tabs-color);
1807
+ --tab-content-opacity: 1;
1808
+ }
1809
+ .v-tab--active::before {
1810
+ transform: scaleX(1);
1811
+ }
1812
+ .v-content-switcher {
1813
+ position: relative;
1814
+ display: block;
1815
+ width: 100%;
1816
+ overflow: hidden;
1817
+ transition: var(--transition-tab);
1818
+ }
1819
+ .v-content-switcher__content {
1820
+ width: 100%;
1821
+ }
1822
+ .v-content-switcher-prev-enter-active, .v-content-switcher-prev-leave-active {
1823
+ transition: var(--transition-tab);
1824
+ }
1825
+ .v-content-switcher-prev-enter-from {
1826
+ transform: translateX(-100%);
1827
+ }
1828
+ .v-content-switcher-prev-enter-to {
1829
+ transform: translateX(0%);
1830
+ }
1831
+ .v-content-switcher-prev-leave {
1832
+ transform: translateX(0%);
1833
+ }
1834
+ .v-content-switcher-prev-leave-active {
1835
+ position: absolute;
1836
+ top: 0;
1837
+ left: 0;
1838
+ }
1839
+ .v-content-switcher-prev-leave-to {
1840
+ transform: translateX(100%);
1841
+ }
1842
+ .v-content-switcher-next-enter-active, .v-content-switcher-next-leave-active {
1843
+ transition: var(--transition-tab);
1844
+ }
1845
+ .v-content-switcher-next-enter-from {
1846
+ transform: translateX(100%);
1847
+ }
1848
+ .v-content-switcher-next-enter-to {
1849
+ transform: translateX(0%);
1850
+ }
1851
+ .v-content-switcher-next-leave {
1852
+ transform: translateX(0%);
1853
+ }
1854
+ .v-content-switcher-next-leave-active {
1855
+ position: absolute;
1856
+ top: 0;
1857
+ left: 0;
1858
+ }
1859
+ .v-content-switcher-next-leave-to {
1860
+ transform: translateX(-100%);
1861
+ }
1681
1862
  .v-data-table {
1682
1863
  --controls-vertial-margin: 0.625em;
1683
1864
  }
package/dist/vui.d.ts CHANGED
@@ -59,6 +59,17 @@ declare type ARGS = Record<string, unknown> & VNodeProps;
59
59
 
60
60
  export declare function configureDataTableDefaults(defaults: Partial<DataTableDefaults>): void;
61
61
 
62
+ export declare interface ContentSwitcherSeeTopOptions {
63
+ /**
64
+ * スクロールする際のオフセット高px
65
+ */
66
+ offset?: number;
67
+ /**
68
+ * スクロール期間
69
+ */
70
+ duration?: number;
71
+ }
72
+
62
73
  export declare const CONTROL_FIELD_VARIANTS: readonly ["outlined", "filled", "flat"];
63
74
 
64
75
  export declare const CONTROL_SIZES: readonly ["sm", "md", "lg"];
@@ -1231,6 +1242,30 @@ export declare const VCheckboxGroup: DefineComponent<{
1231
1242
  stacked: boolean;
1232
1243
  }>;
1233
1244
 
1245
+ export declare const VContentSwitcher: DefineComponent<{
1246
+ modelValue: StringConstructor;
1247
+ order: {
1248
+ type: PropType<(string | VTabsItem)[]>;
1249
+ default: () => never[];
1250
+ };
1251
+ autotop: PropType<boolean | ContentSwitcherSeeTopOptions>;
1252
+ }, () => JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1253
+ 'update:modelValue': (modelValue: string) => true;
1254
+ }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
1255
+ modelValue?: unknown;
1256
+ order?: unknown;
1257
+ autotop?: unknown;
1258
+ } & {
1259
+ order: (string | VTabsItem)[];
1260
+ } & {
1261
+ modelValue?: string | undefined;
1262
+ autotop?: boolean | ContentSwitcherSeeTopOptions | undefined;
1263
+ }> & {
1264
+ "onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
1265
+ }, {
1266
+ order: (string | VTabsItem)[];
1267
+ }>;
1268
+
1234
1269
  export declare const VDataTable: DefineComponent<{
1235
1270
  /** 選択中のkeyの配列 */
1236
1271
  modelValue: {
@@ -3048,6 +3083,78 @@ export declare const VSwitchGroup: DefineComponent<{
3048
3083
  stacked: boolean;
3049
3084
  }>;
3050
3085
 
3086
+ export declare const VTabs: DefineComponent<{
3087
+ color: PropType<ScopeName>;
3088
+ 'v-slots': PropType<ResolveRawSlots_2<{
3089
+ item: VTabsItemLabelSlotCtx;
3090
+ }>>;
3091
+ modelValue: StringConstructor;
3092
+ items: {
3093
+ type: PropType<VTabsItem[]>;
3094
+ required: true;
3095
+ };
3096
+ /**
3097
+ * 自動スクロールする際の余剰オフセット幅(px)
3098
+ */
3099
+ autoScrollOffset: {
3100
+ type: NumberConstructor;
3101
+ default: number;
3102
+ };
3103
+ /**
3104
+ * ルーター同期する場合設定する
3105
+ */
3106
+ router: PropType<VTabsRouterHandler>;
3107
+ /**
3108
+ * ルーティング連携を行う際に、クエリベースのURLマッチングを行う
3109
+ * タブのURLが /page1?tab=xxx のようになる時に設定する
3110
+ */
3111
+ withQuery: BooleanConstructor;
3112
+ }, () => JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3113
+ 'update:modelValue': (newValue: string) => true;
3114
+ change: (newValue: string) => true;
3115
+ }, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
3116
+ color?: unknown;
3117
+ 'v-slots'?: unknown;
3118
+ modelValue?: unknown;
3119
+ items?: unknown;
3120
+ autoScrollOffset?: unknown;
3121
+ router?: unknown;
3122
+ withQuery?: unknown;
3123
+ } & {
3124
+ items: VTabsItem[];
3125
+ autoScrollOffset: number;
3126
+ withQuery: boolean;
3127
+ } & {
3128
+ modelValue?: string | undefined;
3129
+ color?: ScopeName | undefined;
3130
+ "v-slots"?: ResolveRawSlots_2<{
3131
+ item: VTabsItemLabelSlotCtx;
3132
+ }> | undefined;
3133
+ router?: VTabsRouterHandler | undefined;
3134
+ }> & {
3135
+ "onUpdate:modelValue"?: ((newValue: string) => any) | undefined;
3136
+ onChange?: ((newValue: string) => any) | undefined;
3137
+ }, {
3138
+ autoScrollOffset: number;
3139
+ withQuery: boolean;
3140
+ }>;
3141
+
3142
+ export declare interface VTabsItem {
3143
+ value: string;
3144
+ icon?: RawIconProp;
3145
+ label?: VNodeChild | VTabsItemLabelSlot;
3146
+ }
3147
+
3148
+ export declare type VTabsItemLabelSlot = (ctx: VTabsItemLabelSlotCtx) => VNodeChild;
3149
+
3150
+ export declare interface VTabsItemLabelSlotCtx {
3151
+ value: string;
3152
+ active: boolean;
3153
+ vui: VuiService;
3154
+ }
3155
+
3156
+ export declare type VTabsRouterHandler = (value: string) => RouteLocationRaw;
3157
+
3051
3158
  export declare const VTextarea: DefineComponent<{
3052
3159
  'v-slots': PropType<ResolveRawSlots<FormControlSlots & InputBoxSlots>>;
3053
3160
  size: {
@@ -3865,6 +3972,9 @@ export declare interface VuiServiceUISettings {
3865
3972
  color: ScopeName;
3866
3973
  variant: ColorVariant;
3867
3974
  };
3975
+ tabDefault: {
3976
+ color: ScopeName;
3977
+ };
3868
3978
  dialogOk?: {
3869
3979
  color?: ScopeName;
3870
3980
  variant?: ColorVariant;