itube-specs 0.0.215 → 0.0.217

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.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <nav class="f-breadcrumbs" aria-label="Breadcrumb" role="navigation" itemscope itemtype="https://schema.org/BreadcrumbList">
2
+ <nav class="s-breadcrumbs" aria-label="Breadcrumb" role="navigation" itemscope itemtype="https://schema.org/BreadcrumbList">
3
3
  <ol>
4
4
  <li
5
5
  v-for="(item, index) in resultItems"
@@ -10,7 +10,7 @@
10
10
  >
11
11
  <NuxtLink
12
12
  :to="generateLink(item.to || '/')"
13
- class="f-breadcrumbs__item"
13
+ class="s-breadcrumbs__item"
14
14
  itemprop="item"
15
15
  >
16
16
  <span itemprop="name" v-html="item.name" />
@@ -22,7 +22,7 @@
22
22
  itemprop="itemListElement"
23
23
  itemtype="https://schema.org/ListItem"
24
24
  >
25
- <span class="f-breadcrumbs__item" aria-current="page" itemprop="name" v-html="items[items.length - 1].name" />
25
+ <span class="s-breadcrumbs__item" aria-current="page" itemprop="name" v-html="items[items.length - 1].name" />
26
26
  <meta itemprop="position" :content="String(items.length)" />
27
27
  </li>
28
28
  </ol>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="f-chips-panel"
3
+ class="s-chips-panel"
4
4
  ref="containerRef"
5
5
  :class="[
6
6
  { '--expand-show': isExpandOpened },
@@ -9,7 +9,7 @@
9
9
  ]"
10
10
  >
11
11
  <div
12
- class="f-chips-panel__wrapper"
12
+ class="s-chips-panel__wrapper"
13
13
  :class="[{ '--more-show': isElementsOverflow }]"
14
14
  >
15
15
  <slot name="prepend"></slot>
@@ -26,11 +26,11 @@
26
26
  <div
27
27
  v-if="!hideMore"
28
28
  v-show="isElementsOverflow"
29
- class="f-chips-panel__more-wrapper"
29
+ class="s-chips-panel__more-wrapper"
30
30
  :class="{'--small': mini}"
31
31
  >
32
32
  <SChips
33
- class="f-chips-panel__button --more"
33
+ class="s-chips-panel__button --more"
34
34
  :item="{
35
35
  title: moreButtonName,
36
36
  icon: isExpandOpened ? 'minus' : 'plus',
@@ -19,7 +19,7 @@
19
19
  />
20
20
  <SIcon
21
21
  v-if="count > 0"
22
- class="f-filter-button__reset _from-sm"
22
+ class="s-filter-button__reset _from-sm"
23
23
  name="close"
24
24
  size="16"
25
25
  aria-label="reset-filter"
@@ -28,7 +28,7 @@
28
28
  />
29
29
  <span
30
30
  v-if="count > 0"
31
- class="f-filter-button__mobile-count _to-sm"
31
+ class="s-filter-button__mobile-count _to-sm"
32
32
  >{{ mobileCount }}</span>
33
33
  </SButton>
34
34
  </template>
@@ -1,16 +1,16 @@
1
1
  <template>
2
- <div class="f-info-grid">
2
+ <div class="s-info-grid">
3
3
  <div
4
4
  v-for="(item, index) in card.parameters"
5
- class="f-info-grid__item"
6
- :key="`f-info-grid-item-${index}`"
5
+ class="s-info-grid__item"
6
+ :key="`s-info-grid-item-${index}`"
7
7
  >
8
- <span class="f-info-grid__item-title">{{ item.title }}</span>
9
- <p class="f-info-grid__item-values">
8
+ <span class="s-info-grid__item-title">{{ item.title }}</span>
9
+ <p class="s-info-grid__item-values">
10
10
  <NuxtLink
11
11
  v-for="(value, subindex) in getValue(item.values)"
12
12
  :key="`model-value-${index}${subindex}`"
13
- class="f-info-grid__item-value"
13
+ class="s-info-grid__item-value"
14
14
  :to="link(item, value.name)"
15
15
  >{{ value.title }}{{ subindex < getValue(item.values).length - 1 ? ', ' : ''}}</NuxtLink>
16
16
  </p>
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <div class="f-info-socials">
2
+ <div class="s-info-socials">
3
3
  <NuxtLink
4
4
  v-for="(item, index) in items"
5
- class="f-info-socials__item"
5
+ class="s-info-socials__item"
6
6
  :key="`info-social-${index}`"
7
7
  :to="Array.isArray(item.name) ? item.name[0] : item.name"
8
8
  target="_blank"
@@ -1,16 +1,16 @@
1
1
  <template>
2
2
  <nav
3
3
  v-if="length > 1"
4
- class="f-pagination"
4
+ class="s-pagination"
5
5
  >
6
- <div class="f-pagination__items">
6
+ <div class="s-pagination__items">
7
7
 
8
8
  <template v-if="length <= 6">
9
9
  <NuxtLink
10
- class="f-pagination__item"
10
+ class="s-pagination__item"
11
11
  :class="[
12
- number === activeNumber && 'f-pagination__item--active',
13
- theme && `f-button --${theme}`
12
+ number === activeNumber && 's-pagination__item--active',
13
+ theme && `s-button --${theme}`
14
14
  ]"
15
15
  v-for="number in length"
16
16
  :key="`pagination-${number}`"
@@ -22,27 +22,27 @@
22
22
 
23
23
  <template v-else>
24
24
  <NuxtLink
25
- class="f-pagination__item"
25
+ class="s-pagination__item"
26
26
  :class="[
27
- 1 === activeNumber && 'f-pagination__item--active',
28
- theme && `f-button --${theme}`
27
+ 1 === activeNumber && 's-pagination__item--active',
28
+ theme && `s-button --${theme}`
29
29
  ]"
30
30
  :to="linkTo(1)"
31
31
  >1
32
32
  </NuxtLink>
33
33
  <span
34
34
  v-if="activeNumber > 4"
35
- class="f-pagination__item f-pagination__item--empty"
35
+ class="s-pagination__item s-pagination__item--empty"
36
36
  :class="[
37
- theme && `f-button --${theme}`
37
+ theme && `s-button --${theme}`
38
38
  ]"
39
39
  >...</span>
40
40
  <NuxtLink
41
41
  v-else
42
- class="f-pagination__item"
42
+ class="s-pagination__item"
43
43
  :class="[
44
- 2 === activeNumber && 'f-pagination__item--active',
45
- theme && `f-button --${theme}`
44
+ 2 === activeNumber && 's-pagination__item--active',
45
+ theme && `s-button --${theme}`
46
46
  ]"
47
47
  :to="linkTo(2)"
48
48
  >2
@@ -50,10 +50,10 @@
50
50
  <NuxtLink
51
51
  v-for="number in activeNumbers"
52
52
  :class="[
53
- number === activeNumber && 'f-pagination__item--active',
54
- theme && `f-button --${theme}`
53
+ number === activeNumber && 's-pagination__item--active',
54
+ theme && `s-button --${theme}`
55
55
  ]"
56
- class="f-pagination__item"
56
+ class="s-pagination__item"
57
57
  :key="`pagination-${number}`"
58
58
  :to="linkTo(number)"
59
59
  >
@@ -61,26 +61,26 @@
61
61
  </NuxtLink>
62
62
  <span
63
63
  v-if="activeNumber < length - 3"
64
- class="f-pagination__item f-pagination__item--empty"
64
+ class="s-pagination__item s-pagination__item--empty"
65
65
  :class="[
66
- theme && `f-button --${theme}`
66
+ theme && `s-button --${theme}`
67
67
  ]"
68
68
  >...</span>
69
69
  <NuxtLink
70
70
  v-else
71
- class="f-pagination__item"
71
+ class="s-pagination__item"
72
72
  :class="[
73
- length - 1 === activeNumber && 'f-pagination__item--active',
74
- theme && `f-button --${theme}`
73
+ length - 1 === activeNumber && 's-pagination__item--active',
74
+ theme && `s-button --${theme}`
75
75
  ]"
76
76
  :to="linkTo(length - 1)"
77
77
  >{{ length - 1 }}
78
78
  </NuxtLink>
79
79
  <NuxtLink
80
- class="f-pagination__item"
80
+ class="s-pagination__item"
81
81
  :class="[
82
- length === activeNumber && 'f-pagination__item--active',
83
- theme && `f-button --${theme}`
82
+ length === activeNumber && 's-pagination__item--active',
83
+ theme && `s-button --${theme}`
84
84
  ]"
85
85
  :to="linkTo(length)"
86
86
  >
@@ -90,7 +90,7 @@
90
90
  </div>
91
91
  <SLink
92
92
  wide
93
- class="f-pagination__prev"
93
+ class="s-pagination__prev"
94
94
  :to="linkTo(previousValue)"
95
95
  :class="{'--disabled': activeNumber <= 1}"
96
96
  >
@@ -103,7 +103,7 @@
103
103
  </SLink>
104
104
  <SLink
105
105
  wide
106
- class="f-pagination__next"
106
+ class="s-pagination__next"
107
107
  :class="{'--disabled': activeNumber >= length}"
108
108
  :to="linkTo(nextValue)"
109
109
  >
@@ -6,39 +6,39 @@
6
6
  >
7
7
  <template #title>{{ t('report') }}</template>
8
8
  <div
9
- class="f-report__popup-wrapper"
9
+ class="s-report__popup-wrapper"
10
10
  :class="{'_loading': loading}"
11
11
  >
12
12
  <SVideoMiniCard
13
- class="f-report__video-card"
13
+ class="s-report__video-card"
14
14
  :card="reportedVideoCard"
15
15
  />
16
- <div class="f-report__forms">
16
+ <div class="s-report__forms">
17
17
  <details
18
18
  v-for="(item, index) in reportFormsScheme"
19
- class="f-report__form"
19
+ class="s-report__form"
20
20
  name="report-details"
21
21
  :key="`report-form-${index}`"
22
22
  @toggle="(event) => onToggle(event, item.subject)"
23
23
  >
24
24
  <summary
25
- class="f-report__form-button"
25
+ class="s-report__form-button"
26
26
  >
27
27
  {{ t(`report_form.${item.title}`) }}
28
28
  <SIcon
29
- class="f-report__form-icon"
29
+ class="s-report__form-icon"
30
30
  name="chevron-down"
31
31
  size="24"
32
32
  />
33
33
  </summary>
34
34
  <p
35
35
  v-if="item.text"
36
- class="f-report__form-text"
36
+ class="s-report__form-text"
37
37
  >{{ t(`report_form.${item.text}`) }}
38
38
  </p>
39
39
  <p
40
40
  v-if="item.subtext"
41
- class="f-report__form-text"
41
+ class="s-report__form-text"
42
42
  >{{ t(`report_form.${item.subtext}`) }}
43
43
  </p>
44
44
  <ul
@@ -47,11 +47,11 @@
47
47
  <li
48
48
  v-for="(subItem, subIndex) in item.list"
49
49
  :key="`report-list-${subIndex}`"
50
- class="f-report__form-list"
50
+ class="s-report__form-list"
51
51
  >{{ t(`report_form.${subItem.text}`) }}
52
52
  </li>
53
53
  </ul>
54
- <form class="f-report__form-wrapper">
54
+ <form class="s-report__form-wrapper">
55
55
  <template
56
56
  v-for="(subItem, subIndex) in item.items"
57
57
  :key="`${subItem.label}-${subIndex}`"
@@ -6,16 +6,16 @@
6
6
  sheet
7
7
  >
8
8
  <template #title>{{ $t('share') }}</template>
9
- <div class="f-share__popup-wrapper">
9
+ <div class="s-share__popup-wrapper">
10
10
  <SVideoMiniCard
11
11
  v-if="sharedVideoCard && Object.keys(sharedVideoCard).length"
12
- class="f-share__video-card"
12
+ class="s-share__video-card"
13
13
  :card="sharedVideoCard"
14
14
  />
15
- <div class="f-share__buttons">
15
+ <div class="s-share__buttons">
16
16
  <a
17
17
  v-for="(item, index) in buttons"
18
- class="f-share__button"
18
+ class="s-share__button"
19
19
  target="_blank"
20
20
  :key="`share-button-${index}`"
21
21
  :href="item.link"
@@ -30,7 +30,7 @@
30
30
  </a>
31
31
  </div>
32
32
  <SInput
33
- class="f-share__copy"
33
+ class="s-share__copy"
34
34
  :label="inputText"
35
35
  :title="fullUrl"
36
36
  readonly
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="f-sort">
2
+ <div class="s-sort">
3
3
  <SLink
4
- class="f-sort__button"
4
+ class="s-sort__button"
5
5
  v-for="(item, index) in items"
6
6
  :key="`sort-item-${index}`"
7
7
  :to="linkTo(item, index)"
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div class="f-videos-title">
3
- <component :is="titleTag" class="f-videos-title__title _title">
2
+ <div class="s-videos-title">
3
+ <component :is="titleTag" class="s-videos-title__title _title">
4
4
  <slot></slot>
5
5
  </component>
6
- <SCount class="f-videos-title__count" v-if="count">{{ count }}</SCount>
6
+ <SCount class="s-videos-title__count" v-if="count">{{ count }}</SCount>
7
7
  </div>
8
8
  </template>
9
9
 
@@ -1,7 +1,7 @@
1
1
  <!--Если в кнопке иконка, обязательно ее вставлять не в дефолтный слот-->
2
2
  <template>
3
3
  <button
4
- class="f-button"
4
+ class="s-button"
5
5
  :class="[
6
6
  `--${theme}`,
7
7
  `--${size}`,
@@ -3,30 +3,30 @@
3
3
  class="s-checkbox"
4
4
  :class="[
5
5
  {'s-checkbox--disabled': disabled},
6
- {'f-checkbox--error': error},
6
+ {'s-checkbox--error': error},
7
7
  ]"
8
8
  >
9
9
  <input
10
- class="f-checkbox__input _visually-hidden"
10
+ class="s-checkbox__input _visually-hidden"
11
11
  type="checkbox"
12
12
  :name="name"
13
13
  :checked="modelValue"
14
14
  @change="onChange"
15
15
  v-bind="$attrs"
16
16
  >
17
- <span class="f-checkbox__check">
17
+ <span class="s-checkbox__check">
18
18
  <SIcon
19
- class="f-checkbox__check-icon"
19
+ class="s-checkbox__check-icon"
20
20
  name="check"
21
21
  size="20"
22
22
  />
23
23
  </span>
24
- <span class="f-checkbox__label">
24
+ <span class="s-checkbox__label">
25
25
  <slot></slot>
26
26
  </span>
27
27
  <span
28
28
  v-if="$slots.description"
29
- class="f-checkbox__description"
29
+ class="s-checkbox__description"
30
30
  >
31
31
  <slot name="description"></slot>
32
32
  </span>
@@ -6,22 +6,22 @@
6
6
  {'s-input--focused': isFocused},
7
7
  {'s-input--disabled': disabled},
8
8
  {'s-input--error': error},
9
- {'f-input--textarea': isTextArea},
10
- {'f-input--icon': isPassword || icon},
11
- `f-input--${size}`,
9
+ {'s-input--textarea': isTextArea},
10
+ {'s-input--icon': isPassword || icon},
11
+ `s-input--${size}`,
12
12
  ]"
13
13
  >
14
14
  <label
15
15
  v-if="isTextArea"
16
- class="f-input__label f-input__label--external"
16
+ class="s-input__label s-input__label--external"
17
17
  :for="name"
18
18
  >
19
19
  {{ label }}
20
20
  </label>
21
- <div class="f-input__wrapper">
21
+ <div class="s-input__wrapper">
22
22
  <textarea
23
23
  v-if="isTextArea"
24
- class="f-input__input"
24
+ class="s-input__input"
25
25
  rows="3"
26
26
  :value="modelValue"
27
27
  :name="name"
@@ -36,7 +36,7 @@
36
36
  ></textarea>
37
37
  <input
38
38
  v-else
39
- class="f-input__input"
39
+ class="s-input__input"
40
40
  :id="name"
41
41
  :name="name"
42
42
  :type="showText ? 'text' : type"
@@ -56,25 +56,25 @@
56
56
  />
57
57
  <span
58
58
  v-if="!isTextArea && isFilled"
59
- class="f-input__label">
59
+ class="s-input__label">
60
60
  {{ label }}
61
61
  </span>
62
62
  <button
63
63
  v-if="isPassword || icon"
64
64
  type="button"
65
- class="f-input__button"
65
+ class="s-input__button"
66
66
  @click="onButtonInputClick"
67
67
  >
68
68
  <SIcon
69
69
  :name="isPassword ? 'show' : icon || ''"
70
- class="f-input__button-icon"
70
+ class="s-input__button-icon"
71
71
  size="24"
72
72
  />
73
73
  </button>
74
74
  </div>
75
75
  <!-- <p-->
76
76
  <!-- v-if="error"-->
77
- <!-- class="f-input__error"-->
77
+ <!-- class="s-input__error"-->
78
78
  <!-- >-->
79
79
  <!-- <SIcon-->
80
80
  <!-- name="danger"-->
@@ -16,12 +16,12 @@
16
16
  v-bind="$attrs"
17
17
  >
18
18
  <span class="s-radio__check" />
19
- <span class="f-radio__label">
19
+ <span class="s-radio__label">
20
20
  <slot>{{ label }}</slot>
21
21
  </span>
22
22
  <span
23
23
  v-if="$slots.description"
24
- class="f-radio__description"
24
+ class="s-radio__description"
25
25
  >
26
26
  <slot name="description"></slot>
27
27
  </span>
@@ -40,7 +40,7 @@
40
40
  :value="item.value"
41
41
  class="s-select__option"
42
42
  :key="`s-select-${name}-${index}`"
43
- :selected="item.value === modelValue && item.value !== placeholder"
43
+ :selected="isSelected(item)"
44
44
  >{{ capitalize(item.title as string || item.name as string) }}</option>
45
45
  </select>
46
46
  <SIcon
@@ -56,7 +56,7 @@
56
56
  import type { ISelectItem } from '../../types';
57
57
  import type { LocaleObject } from '#internal-i18n-types';
58
58
 
59
- withDefaults(defineProps<{
59
+ const props = withDefaults(defineProps<{
60
60
  name: string
61
61
  icon?: string
62
62
  placeholder?: string
@@ -85,4 +85,8 @@ function capitalize(text: string) {
85
85
  if (!text) return '';
86
86
  return text.charAt(0).toUpperCase() + text.slice(1);
87
87
  }
88
+
89
+ function isSelected(item: ISelectItem | LocaleObject) {
90
+ return String(item.value).toLowerCase() === String(props.modelValue).toLowerCase() && item.value !== props.placeholder
91
+ }
88
92
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.215",
4
+ "version": "0.0.217",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
@@ -10,7 +10,7 @@ export interface IPlaylistThumb {
10
10
  export interface IRawPlaylistData {
11
11
  guid: string; // unused
12
12
  created: number; // unused
13
- updated: number; // ✅ used → <SInfoChips :updated="playlistsData.updated" />
13
+ updated: number; // ✅ used → <FInfoChips :updated="playlistsData.updated" />
14
14
  id: string; // ✅ used → :playlist-id="playlistsData.id", link to `/playlists/${id}`
15
15
  name: string; // ✅ used → title, heading, dropdown alignment
16
16
  identity_guid: string; // unused
@@ -19,10 +19,10 @@ export interface IRawPlaylistData {
19
19
  niche: string; // unused
20
20
  domain: string; // unused
21
21
  thumbs: IPlaylistThumb[]; // unused
22
- videos_count: number; // ✅ used → <SInfoChips :videos-count="..." />
22
+ videos_count: number; // ✅ used → <FInfoChips :videos-count="..." />
23
23
  first_video_id: string; // ✅ used → <SLink :to="`/playlists/${id}/${firstVideoId}`" />
24
24
  search_tags: string[]; // ✅ used → searchTags computed
25
- views: number; // ✅ used → <SInfoChips :views="..." />
25
+ views: number; // ✅ used → <FInfoChips :views="..." />
26
26
  likes: number; // ✅ used (but assigned as **dislikes**)
27
27
  dislikes: number; // ✅ used (but assigned as **likes**)
28
28
  available_videos: number; // unused