tide-design-system 2.5.8 → 2.5.9

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 (77) hide show
  1. package/README.md +1 -0
  2. package/dist/IconCalculate-Bbp4hHOW.js +16 -0
  3. package/dist/IconCalculate-CGwDSRuU.cjs +2 -0
  4. package/dist/style.css +1 -1
  5. package/dist/tide-design-system.cjs +2 -2
  6. package/dist/tide-design-system.esm.js +1255 -1211
  7. package/dist/utilities/storybook.ts +0 -2
  8. package/docs/images.md +50 -0
  9. package/package.json +2 -2
  10. package/src/assets/svg/icons/IconCalculate.svg +3 -0
  11. package/src/components/TideAlert.vue +19 -1
  12. package/src/components/TideBadge.vue +16 -0
  13. package/src/components/TideBadgeTrustedPartner.vue +10 -0
  14. package/src/components/TideBadgeVerifiedVehicle.vue +9 -0
  15. package/src/components/TideBreadCrumbs.vue +10 -0
  16. package/src/components/TideButton.vue +9 -0
  17. package/src/components/TideButtonIcon.vue +9 -0
  18. package/src/components/TideButtonPagination.vue +16 -0
  19. package/src/components/TideButtonSave.vue +9 -0
  20. package/src/components/TideButtonSegmented.vue +10 -0
  21. package/src/components/TideCard.vue +21 -1
  22. package/src/components/TideCarousel.vue +24 -0
  23. package/src/components/TideChipAction.vue +1 -0
  24. package/src/components/TideChipFilter.vue +10 -0
  25. package/src/components/TideChipInput.vue +10 -0
  26. package/src/components/TideColumns.vue +10 -0
  27. package/src/components/TideDivider.vue +10 -0
  28. package/src/components/TideForm.vue +9 -0
  29. package/src/components/TideIcon.vue +12 -0
  30. package/src/components/TideImage.vue +34 -4
  31. package/src/components/TideImageBackground.vue +16 -0
  32. package/src/components/TideIndicator.vue +10 -0
  33. package/src/components/TideInputCheckbox.vue +24 -0
  34. package/src/components/TideInputRadio.vue +20 -0
  35. package/src/components/TideInputSelect.vue +2 -2
  36. package/src/components/TideInputSupportingText.vue +9 -0
  37. package/src/components/TideInputText.vue +47 -1
  38. package/src/components/TideInputTextarea.vue +30 -0
  39. package/src/components/TideLink.vue +24 -0
  40. package/src/components/TideModal.vue +9 -0
  41. package/src/components/TidePopover.vue +12 -0
  42. package/src/components/TideRating.vue +16 -0
  43. package/src/components/TideRealmLogo.vue +9 -0
  44. package/src/components/TideSheet.vue +9 -0
  45. package/src/components/TideSwitch.vue +10 -0
  46. package/src/components/TideTabs.vue +10 -0
  47. package/src/components/TideToaster.vue +9 -0
  48. package/src/stories/TideAccordionItem.stories.ts +4 -12
  49. package/src/stories/TideAlert.stories.ts +2 -11
  50. package/src/stories/TideBadge.stories.ts +0 -4
  51. package/src/stories/TideBadgeTrustedPartner.stories.ts +0 -1
  52. package/src/stories/TideBreadCrumbs.stories.ts +0 -1
  53. package/src/stories/TideButtonPagination.stories.ts +0 -4
  54. package/src/stories/TideButtonSegmented.stories.ts +0 -1
  55. package/src/stories/TideCard.stories.ts +9 -8
  56. package/src/stories/TideCarousel.stories.ts +0 -7
  57. package/src/stories/TideChipAction.stories.ts +2 -2
  58. package/src/stories/TideChipFilter.stories.ts +0 -1
  59. package/src/stories/TideChipInput.stories.ts +0 -1
  60. package/src/stories/TideColumns.stories.ts +0 -1
  61. package/src/stories/TideDivider.stories.ts +0 -1
  62. package/src/stories/TideIcon.stories.ts +0 -2
  63. package/src/stories/TideImage.stories.ts +1 -11
  64. package/src/stories/TideImageBackground.stories.ts +1 -7
  65. package/src/stories/TideIndicator.stories.ts +0 -1
  66. package/src/stories/TideInputCheckbox.stories.ts +2 -14
  67. package/src/stories/TideInputRadio.stories.ts +1 -9
  68. package/src/stories/TideInputSelect.stories.ts +2 -8
  69. package/src/stories/TideInputText.stories.ts +1 -22
  70. package/src/stories/TideInputTextarea.stories.ts +1 -14
  71. package/src/stories/TideLink.stories.ts +1 -10
  72. package/src/stories/TidePopover.stories.ts +0 -2
  73. package/src/stories/TideRating.stories.ts +1 -7
  74. package/src/stories/TideSwitch.stories.ts +1 -4
  75. package/src/stories/TideTabs.stories.ts +0 -1
  76. package/src/types/Icon.ts +1 -0
  77. package/src/utilities/storybook.ts +0 -2
@@ -24,7 +24,6 @@ export const tab = ' ';
24
24
 
25
25
  export const argTypeBoolean = {
26
26
  control: 'select',
27
- description: 'Determines whether CSS utility is present',
28
27
  options: BOOLEAN,
29
28
  table: {
30
29
  defaultValue: { summary: 'False' },
@@ -34,7 +33,6 @@ export const argTypeBoolean = {
34
33
 
35
34
  export const argTypeBooleanUnrequired = {
36
35
  control: 'select',
37
- description: 'True, False, or undefined<br />(for demonstration purposes)',
38
36
  options: BOOLEAN_UNREQUIRED,
39
37
  table: {
40
38
  defaultValue: { summary: 'None' },
package/docs/images.md ADDED
@@ -0,0 +1,50 @@
1
+ # Responsive Images in TIDE
2
+
3
+ The `<TideImage />` and `<TideImageBackground />` components provide built-in responsive loading and error handling.
4
+
5
+ ## Quick Start
6
+
7
+ The `src` prop is the default image. Use the `:sources` prop to provide overrides for specific screen sizes using a mobile-first (min-width) pattern.
8
+
9
+ **Minimal Responsive Example**
10
+
11
+ ``` vue
12
+ <template>
13
+ <TideImage
14
+ src="image-mobile.png"
15
+ :sources="[
16
+ ...smaller screens
17
+ { media: BREAKPOINT.LG, srcset: "image-desktop.png" },
18
+ ...larger screens
19
+ ]"
20
+ />
21
+ </template>
22
+ ```
23
+
24
+ ## Configuration
25
+
26
+ The `:sources` array generates `<source>` elements within a `<picture>` tag. High-density descriptors (e.g., `2x`) are supported in the `srcset` string.
27
+
28
+ ### 1. Responsive Sources
29
+
30
+ | Constant | Value | Resulting Media Query |
31
+ | - | - | - |
32
+ | `MEDIA.SM` | 768 | `(min-width: 768px)` |
33
+ | `MEDIA.MD` | 992 | `(min-width: 992px)` |
34
+ | `MEDIA.LG` | 1232 | `(min-width: 1232px)` |
35
+ | `MEDIA.XL` | 1920 | `(min-width: 1920px)` |
36
+
37
+ > **Note:** Order matters. The browser selects the first matching source from the top of the array down.
38
+
39
+ ### 2. Performance & Behavior
40
+
41
+ - **Lazy Loading:** Enabled by default (`is-lazy: true`). For "above-the-fold" content (like Hero banners), set `:is-lazy="false"` to trigger high-priority fetching.
42
+ - **Object Fit:** Controlled via the `object-fit` prop (defaults to `OBJECT_FIT.COVER`).
43
+
44
+ ## Error Handling
45
+
46
+ If no valid source is loaded, the component automatically injects a placeholder fallback.
47
+
48
+ **Placeholder Preview:**
49
+
50
+ <img src="https://cdn-static.tilabs.io/marketplace/common/image-coming-soon.svg" width="400px" />
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "eslint-plugin-storybook": "^0.8.0",
24
24
  "eslint-plugin-vue": "^9.9.0",
25
25
  "happy-dom": "^20.0.0",
26
- "jsdom": "^21.1.0",
26
+ "jsdom": "^28.1.0",
27
27
  "npm-run-all": "^4.1.5",
28
28
  "prettier": "^2.7.1",
29
29
  "rollup-plugin-typescript2": "^0.36.0",
@@ -63,7 +63,7 @@
63
63
  "main": "dist/tide-design-system.cjs",
64
64
  "module": "dist/tide-design-system.esm.js",
65
65
  "types": "dist/tide-design-system.esm.d.ts",
66
- "version": "2.5.8",
66
+ "version": "2.5.9",
67
67
  "dependencies": {
68
68
  "@floating-ui/vue": "^1.1.6"
69
69
  }
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <path d="M8.14 18h1.5v-2h2v-1.5h-2v-2h-1.5v2h-2V16h2zm5-.75h5v-1.5h-5zm0-2.5h5v-1.5h-5zm1.1-3.8 1.4-1.4 1.4 1.4L18.1 9.9l-1.4-1.45 1.4-1.4L17.04 6l-1.4 1.4-1.4-1.4-1.05 1.05 1.4 1.4-1.4 1.45zM6.4 9.2h5V7.7h-5zM5.14 21q-.82 0-1.41-.59-.6-.59-.59-1.41V5q0-.82.59-1.41.6-.6 1.41-.59h14q.82 0 1.42.59.58.58.58 1.41v14q0 .83-.58 1.41-.6.6-1.42.59zm0-2h14V5h-14z"/>
3
+ </svg>
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders an alert component with customizable content and behavior.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidealert--docs) for TideAlert
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { Comment, computed, useSlots } from 'vue';
3
12
 
@@ -14,10 +23,19 @@
14
23
  import type { Alert } from '@/types/Alert';
15
24
 
16
25
  type Props = {
17
- heading?: string;
26
+ /** Call To Action that renders as a TideLink; clicking emits a separate `click` event */
18
27
  ctaLabel?: string;
28
+
29
+ /** Heading text */
30
+ heading?: string;
31
+
32
+ /** Determines whether the Alert can be closed by the user */
19
33
  isDismissible?: boolean;
34
+
35
+ /** Determines whether the Alert is an overlay or displaces content */
20
36
  isToast?: boolean;
37
+
38
+ /** Alert type */
21
39
  type?: Alert;
22
40
  };
23
41
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a badge component with customizable content and behavior.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebadge--docs) for TideBadge
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import TideIcon from '@/components/TideIcon.vue';
3
12
  import { BADGE_COLOR_DETAILS } from '@/types/Badge';
@@ -7,9 +16,16 @@
7
16
  import type { Icon } from '@/types/Icon';
8
17
 
9
18
  type Props = {
19
+ /** Determines which color option to adopt (if any) */
10
20
  color?: BadgeColor;
21
+
22
+ /** Icon to left of label */
11
23
  iconLeading?: Icon;
24
+
25
+ /** Determines whether to display the "Floating" variant styles */
12
26
  isFloating?: boolean;
27
+
28
+ /** Badge text */
13
29
  label: string;
14
30
  };
15
31
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a trusted partner badge component with preset years.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebadgetrustedpartner--docs) for TideBadgeTrustedPartner
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import TideIcon from '@/components/TideIcon.vue';
3
12
  import { BADGE_TRUSTED } from '@/types/Badge';
@@ -7,6 +16,7 @@
7
16
  import type { BadgeTrustedYears } from '@/types/Badge';
8
17
 
9
18
  type Props = {
19
+ /** Number of years to display in the trusted partner badge */
10
20
  years?: BadgeTrustedYears;
11
21
  };
12
22
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a badge component for indicating a verified vehicle.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebadgeverifiedvehicle--docs) for TideBadgeVerifiedVehicle
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import TideIcon from '@/components/TideIcon.vue';
3
12
  import { ICON } from '@/types/Icon';
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a set of breadcrumbs for navigation purposes.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebreadcrumbs--docs) for TideBreadCrumbs
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import InternalBaseLink from '@/components/InternalBaseLink.vue';
3
12
  import TideIcon from '@/components/TideIcon.vue';
@@ -8,6 +17,7 @@
8
17
  import type { BreadCrumb } from '@/types/BreadCrumb';
9
18
 
10
19
  type Props = {
20
+ /** An array of labels and optional URLs to display for each bread crumb. */
11
21
  breadCrumbs: BreadCrumb[];
12
22
  };
13
23
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a button component with various styling options.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebutton--docs) for TideButton
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { computed } from 'vue';
3
12
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a icon button component with various styling options.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebuttonicon--docs) for TideButtonIcon
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { computed } from 'vue';
3
12
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a button component for use in pagination purposes.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebuttonpagination--docs) for TideButtonPagination
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { computed } from 'vue';
3
12
 
@@ -8,9 +17,16 @@
8
17
  import type { ElementBroad } from '@/types/Element';
9
18
 
10
19
  type Props = {
20
+ /** Indicates whether Pagination Button is associated with the displayed page */
11
21
  disabled?: boolean;
22
+
23
+ /** HTML tag type */
12
24
  element?: ElementBroad;
25
+
26
+ /** URL to open<br />(Link only) */
13
27
  href?: string;
28
+
29
+ /** Button text */
14
30
  label: string | number;
15
31
  };
16
32
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a button component for use to save items.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebuttonsave--docs) for TideButtonSave
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script setup lang="ts">
2
11
  import { ref, watch } from 'vue';
3
12
 
@@ -1,9 +1,19 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a segmented button component for navigation purposes.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidebuttonsegmented--docs) for TideButtonSegmented
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { CSS } from '@/types/Styles';
3
12
 
4
13
  import type { Tab } from '@/types/Tab';
5
14
 
6
15
  type Props = {
16
+ /** Sets label and callback for each tab */
7
17
  tabs: Tab[] | readonly Tab[];
8
18
  };
9
19
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a card component with a heading, description, and optional icon.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidecard--docs) for TideCard
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { computed } from 'vue';
3
12
 
@@ -13,11 +22,22 @@
13
22
  import type { Icon } from '@/types/Icon';
14
23
 
15
24
  type Props = {
25
+ /** Optional description text displayed below the heading */
16
26
  description?: string;
27
+
28
+ /** The main heading of the card. */
17
29
  heading: string;
30
+
31
+ /** Optional icon displayed on the card. */
18
32
  icon?: Icon;
33
+
34
+ /** Determines whether the Card is selected (for selectable cards). */
19
35
  selected?: boolean;
36
+
37
+ /** Type of the card */
20
38
  type?: CardType;
39
+
40
+ /** URL to navigate to on click. */
21
41
  href?: string;
22
42
  };
23
43
 
@@ -30,7 +50,7 @@
30
50
  });
31
51
 
32
52
  const rootElement = computed<ElementBroad | typeof InternalBaseLink>(() =>
33
- props.href ? InternalBaseLink : props.type === TYPE_CARD.INFORMATIONAL ? ELEMENT_BROAD.DIV : ELEMENT_BROAD.DIV
53
+ props.href ? InternalBaseLink : props.type === TYPE_CARD.INFORMATIONAL ? ELEMENT_BROAD.DIV : ELEMENT_BROAD.BUTTON
34
54
  );
35
55
  </script>
36
56
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a carousel component with navigation controls and slide indicators.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidecarousel--docs) for TideCarousel
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { computed, onMounted, onUnmounted, ref } from 'vue';
3
12
 
@@ -7,13 +16,28 @@
7
16
  import { CSS } from '@/types/Styles';
8
17
 
9
18
  type Props = {
19
+ /** Determines whether to display the indicator dots overlay<br />(Only valid with full width cards) */
10
20
  hasDots?: boolean;
21
+
22
+ /** Determines whether to display on-page or floating carousel */
11
23
  isFloating?: boolean;
24
+
25
+ /** Determines font role used for title display */
12
26
  isHeadline1?: boolean;
27
+
28
+ /** Determines whether on-page buttons should be hidden until hover */
13
29
  isHideawayButtons?: boolean;
30
+
31
+ /** Determines whether to scroll by page or by individual slide */
14
32
  isScrollByPage?: boolean;
33
+
34
+ /** Determines the max number of indicator dots to display at a given time */
15
35
  maxDots?: number;
36
+
37
+ /** Determines the text displayed to the right of the title */
16
38
  subtitle?: string;
39
+
40
+ /** Determines the title text displayed above the carousel */
17
41
  title?: string;
18
42
  };
19
43
 
@@ -56,6 +56,7 @@
56
56
  CSS.GAP.HALF,
57
57
  CSS.BORDER.FULL.ONE,
58
58
  CSS.BORDER.RADIUS.FULL,
59
+ CSS.BORDER.COLOR.DEFAULT,
59
60
  CSS.PADDING.X.ONE,
60
61
  CSS.PADDING.Y.HALF,
61
62
  CSS.BG.SURFACE.DEFAULT,
@@ -1,7 +1,17 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a chip filter component for use in navigation.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidechipfilter--docs) for TideChipFilter
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { CSS } from '@/types/Styles';
3
12
 
4
13
  type Props = {
14
+ /** Chip text. */
5
15
  label: string;
6
16
  };
7
17
 
@@ -1,9 +1,19 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a input chip component for use in navigation.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidechipinput--docs) for TideChipInput
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import TideIcon from '@/components/TideIcon.vue';
3
12
  import { ICON } from '@/types/Icon';
4
13
  import { CSS } from '@/types/Styles';
5
14
 
6
15
  type Props = {
16
+ /** Chip text */
7
17
  label: string;
8
18
  };
9
19
 
@@ -1,7 +1,17 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a columns component for use in navigation.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidecolumns--docs) for TideColumns
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { CSS } from '@/types/Styles';
3
12
 
4
13
  type Props = {
14
+ /** Determines label for the columns section. */
5
15
  heading?: string;
6
16
  };
7
17
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a divider component.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tidedivider--docs) for TideDivider
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { ORIENTATION } from '@/types/Orientation';
3
12
  import { CSS } from '@/types/Styles';
@@ -5,6 +14,7 @@
5
14
  import type { Orientation } from '@/types/Orientation';
6
15
 
7
16
  type Props = {
17
+ /** Determines whether Divider is horizontal or vertical */
8
18
  orientation?: Orientation;
9
19
  };
10
20
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders a form component to be used to wrap form elements and handle form submission.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tideform--docs) for TideForm
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script setup lang="ts">
2
11
  import { useTideForm } from '@/composables/useTideForm';
3
12
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders an icon component.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tideicon--docs) for TideIcon
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { defineAsyncComponent, markRaw, ref, watch } from 'vue';
3
12
 
@@ -11,7 +20,10 @@
11
20
  import type { Component } from 'vue';
12
21
 
13
22
  type Props = {
23
+ /** Icon */
14
24
  icon: Icon;
25
+
26
+ /** Determines icon dimensions */
15
27
  size?: Size;
16
28
  };
17
29
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders an image component.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tideimage--docs) for TideImage
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { computed, ref } from 'vue';
3
12
 
@@ -8,12 +17,25 @@
8
17
  import type { Source } from '@/types/Source';
9
18
 
10
19
  type Props = {
20
+ /** Text display when image can't be loaded. */
11
21
  alt?: string;
22
+
23
+ /** Apply a "height" attribute to the internal image tag (including unit). */
12
24
  height?: string;
25
+
26
+ /** Determines whether to delay loading until image is in viewport. */
13
27
  isLazy?: boolean;
28
+
29
+ /** Controls how the image scales within its box, effective only when image size differs from its intrinsic dimensions. */
14
30
  objectFit?: ObjectFit;
31
+
32
+ /** Determines image sources by breakpoint. */
15
33
  sources?: Source[];
34
+
35
+ /** Image URL. */
16
36
  src?: string;
37
+
38
+ /** Apply a "width" attribute to the internal image tag (including unit). */
17
39
  width?: string;
18
40
  };
19
41
 
@@ -47,11 +69,19 @@
47
69
 
48
70
  const setImageFromDefault = () => {
49
71
  const currentSrc = img.value?.currentSrc;
50
- const pictureSource = picture.value?.querySelector(`source[srcset="${currentSrc}"]`);
72
+ const sources = picture.value?.querySelectorAll('source') ?? [];
73
+
74
+ if (!currentSrc) return;
51
75
 
52
- if (currentSrc && pictureSource) {
53
- pictureSource.srcset = imageDefault;
54
- } else if (img.value) {
76
+ for (const source of sources) {
77
+ const resolved = new URL(source.srcset, window.location.href).href;
78
+
79
+ if (resolved === currentSrc) {
80
+ source.remove();
81
+ return;
82
+ }
83
+ }
84
+ if (img.value?.getAttribute('src') !== imageDefault) {
55
85
  img.value.src = imageDefault;
56
86
  }
57
87
  };
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders an image background component.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tideimagebackground--docs) for TideImageBackground
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import TideImage from '@/components/TideImage.vue';
3
12
  import { OBJECT_FIT } from '@/types/Image';
@@ -6,9 +15,16 @@
6
15
  import type { Source } from '@/types/Source';
7
16
 
8
17
  type Props = {
18
+ /** Text display when image can't be loaded. */
9
19
  alt?: string;
20
+
21
+ /** Determines whether to delay loading until image is in viewport. */
10
22
  isLazy?: boolean;
23
+
24
+ /** Determines image sources by breakpoint. */
11
25
  sources?: Source[];
26
+
27
+ /** Image URL. */
12
28
  src?: string;
13
29
  };
14
30
 
@@ -1,7 +1,17 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders an indicator component.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tideindicator--docs) for TideIndicator
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { CSS } from '@/types/Styles';
3
12
 
4
13
  type Props = {
14
+ /** Indicator text */
5
15
  label?: string | number;
6
16
  };
7
17
 
@@ -1,3 +1,12 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Renders an input checkbox component.
4
+ *
5
+ * @see the [Storybook interface](https://tide-design-system.netlify.app/?path=/docs/components-tideinputcheckbox--docs) for TideInputCheckbox
6
+ */
7
+ export default {};
8
+ </script>
9
+
1
10
  <script lang="ts" setup>
2
11
  import { computed, ref, watch, watchEffect } from 'vue';
3
12
 
@@ -13,13 +22,28 @@
13
22
  import type { ValidationResult } from '@/types/Validation';
14
23
 
15
24
  type Props = {
25
+ /** Determines whether Checkbox state is interactable */
16
26
  disabled?: boolean;
27
+
28
+ /** Overrides the default error message and valid state */
17
29
  error?: string;
30
+
31
+ /** Determines whether Checkbox is indeterminate */
18
32
  indeterminate?: boolean;
33
+
34
+ /** Unique ID attribute (to bind Checkbox label to input) */
19
35
  inputId?: string;
36
+
37
+ /** Label content */
20
38
  label: string;
39
+
40
+ /** Name attribute */
21
41
  name?: string;
42
+
43
+ /** Parenthetical response count */
22
44
  number?: number;
45
+
46
+ /** Determines whether input is required */
23
47
  required?: boolean;
24
48
  };
25
49