@kiva/kv-components 3.107.1 → 3.108.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,42 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.108.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.107.2...@kiva/kv-components@3.108.0) (2024-11-15)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * change error text color for KvTextInput ([5dbf6ad](https://github.com/kiva/kv-ui-elements/commit/5dbf6ad72b436d7aabf868cf8bac0ed7f1439412))
12
+ * color updates for default theme and KvButton ([e27b124](https://github.com/kiva/kv-ui-elements/commit/e27b1243e797322c95cf52f505787e6c9b5eceac))
13
+ * handle underline styles for buttons and clickable loan cards ([ef4d19f](https://github.com/kiva/kv-ui-elements/commit/ef4d19f420b00201baf5e0c0dcd39194a2be970c))
14
+ * more wip for ecosystem themes ([3fd83ab](https://github.com/kiva/kv-ui-elements/commit/3fd83ab38e0e9463c375a94fc84012fa38948cdb))
15
+ * more wip work for new ecosystem themes ([90447d4](https://github.com/kiva/kv-ui-elements/commit/90447d471178b410637d8ba50d535180c8b03718))
16
+ * secondary button styling ([4602efa](https://github.com/kiva/kv-ui-elements/commit/4602efac93b4755015b847090d1eb1e24d70c1d9))
17
+ * switch vertical tab active color to action instead of action-highlight ([cc1e2d5](https://github.com/kiva/kv-ui-elements/commit/cc1e2d5b12f7981ffb7a8e724036c65bc0f60d6d))
18
+
19
+
20
+ ### Features
21
+
22
+ * update styling for KvTextInput error state ([361cdba](https://github.com/kiva/kv-ui-elements/commit/361cdbacd2f56e1f38e330efe7425b4922c89443))
23
+ * use external file for heading underline svg MP-544 MP-545 ([fad8f16](https://github.com/kiva/kv-ui-elements/commit/fad8f16b5555916624c26a24828ff39dcbc5edbf))
24
+ * use green-3 and stone-3 for bg-secondary in dark themes ([d13d63e](https://github.com/kiva/kv-ui-elements/commit/d13d63e08346b936a1bb2bc61c4d3fc6c5a4e8d0))
25
+ * wip initial pass at ecosystem themes ([680dbbc](https://github.com/kiva/kv-ui-elements/commit/680dbbc7aab575f9db43d7b10bdcba9003fd589e))
26
+
27
+
28
+
29
+
30
+
31
+ ## [3.107.2](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.107.1...@kiva/kv-components@3.107.2) (2024-11-05)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * add specifier for vue imports ([f62b249](https://github.com/kiva/kv-ui-elements/commit/f62b249e67deaf46a398c5ad59251990befe788d))
37
+
38
+
39
+
40
+
41
+
6
42
  ## [3.107.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.107.0...@kiva/kv-components@3.107.1) (2024-11-05)
7
43
 
8
44
 
@@ -7,6 +7,10 @@ const config = {
7
7
  '../stories/**/*.stories.@(js|jsx|ts|tsx)'
8
8
  ],
9
9
 
10
+ staticDirs: [
11
+ '../../../../dist/assets',
12
+ ],
13
+
10
14
  addons: [
11
15
  "@storybook/addon-links",
12
16
  "@storybook/addon-essentials",
@@ -23,7 +27,7 @@ const config = {
23
27
  'style-loader',
24
28
  {
25
29
  loader: 'css-loader',
26
- options: { importLoaders: 1 }
30
+ options: { importLoaders: 1, url: false }
27
31
  },
28
32
  {
29
33
  // Gets options from `postcss.config.js` in your project root
@@ -5,7 +5,7 @@
5
5
  :to="to"
6
6
  :type="computedType"
7
7
  :disabled="isDisabled"
8
- class="hover:tw-no-underline focus:tw-no-underline tw-inline-block"
8
+ class="tw-no-underline hover:tw-no-underline focus:tw-no-underline tw-inline-block"
9
9
  :class="{
10
10
  'tw-opacity-low': state === 'disabled',
11
11
  'tw-pointer-events-none': state === 'loading' || isDisabled
@@ -137,16 +137,16 @@ export default {
137
137
  }
138
138
  break;
139
139
  case 'secondary':
140
- classes = 'tw-text-primary';
140
+ classes = 'tw-text-action-highlight';
141
141
  if (state.value === 'active') {
142
- classes = `${classes} tw-bg-secondary tw-border-primary`;
142
+ classes = `${classes} tw-bg-secondary`;
143
143
  } else {
144
144
  // eslint-disable-next-line max-len
145
- classes = `${classes} tw-bg-primary hover:tw-bg-secondary tw-border-tertiary hover:tw-border-primary`;
145
+ classes = `${classes} tw-bg-primary hover:tw-bg-secondary tw-border-action-highlight`;
146
146
  }
147
147
  break;
148
148
  case 'danger':
149
- classes = 'tw-text-primary-inverse';
149
+ classes = 'tw-text-danger';
150
150
  if (state.value === 'active') {
151
151
  classes = `${classes} tw-bg-danger-highlight tw-border-danger-highlight`;
152
152
  } else {
@@ -157,9 +157,9 @@ export default {
157
157
  case 'link':
158
158
  classes = 'tw-bg-primary-inverse tw-text-primary-inverse';
159
159
  if (state.value === 'active') {
160
- classes = `${classes} tw-border-secondary`;
160
+ classes = `${classes} tw-border-secondary tw-bg-action`;
161
161
  } else {
162
- classes = `${classes} tw-border-primary hover:tw-border-secondary`;
162
+ classes = `${classes} tw-border-action-highlight hover:tw-border-action hover:tw-bg-action`;
163
163
  }
164
164
  break;
165
165
  case 'ghost':
@@ -171,11 +171,12 @@ export default {
171
171
  }
172
172
  break;
173
173
  case 'caution':
174
- classes = 'tw-text-primary tw-border-transparent';
174
+ classes = 'tw-text-caution';
175
175
  if (state.value === 'active') {
176
- classes = `${classes} tw-bg-caution-highlight`;
176
+ classes = `${classes} tw-bg-caution-highlight tw-border-caution-highlight`;
177
177
  } else {
178
- classes = `${classes} tw-bg-caution hover:tw-bg-caution-highlight`;
178
+ // eslint-disable-next-line max-len
179
+ classes = `${classes} tw-bg-caution hover:tw-bg-caution-highlight tw-border-caution hover:tw-border-caution-highlight`;
179
180
  }
180
181
  break;
181
182
  }
@@ -90,7 +90,7 @@
90
90
  :is="tag"
91
91
  :to="readMorePath"
92
92
  :href="readMorePath"
93
- class="tw-flex hover:tw-no-underline focus:tw-no-underline"
93
+ class="tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline"
94
94
  :class="{ 'tw-px-1': largeCard }"
95
95
  aria-label="Loan tag"
96
96
  @click.native="clickReadMore('Tag', $event)"
@@ -105,7 +105,7 @@
105
105
  :is="tag"
106
106
  :to="readMorePath"
107
107
  :href="readMorePath"
108
- class="loan-card-use tw-text-primary"
108
+ class="loan-card-use tw-no-underline tw-text-primary"
109
109
  aria-label="Loan use"
110
110
  @click.native="clickReadMore('Use', $event)"
111
111
  >
@@ -183,7 +183,7 @@
183
183
  v-if="unreservedAmount > 0"
184
184
  :to="readMorePath"
185
185
  :href="readMorePath"
186
- class="loan-card-progress tw-mt-1"
186
+ class="loan-card-progress tw-no-underline tw-mt-1"
187
187
  aria-label="Loan progress"
188
188
  @click.native="clickReadMore('Progress', $event)"
189
189
  >
@@ -96,7 +96,7 @@
96
96
  :to="readMorePath"
97
97
  :href="readMorePath"
98
98
  aria-label="Borrower name"
99
- class="!tw-text-primary"
99
+ class="!tw-text-primary tw-no-underline"
100
100
  @click.native="clickReadMore('Name', $event)"
101
101
  >
102
102
  <h3
@@ -136,7 +136,7 @@
136
136
  v-else
137
137
  :to="readMorePath"
138
138
  :href="readMorePath"
139
- class="tw-flex hover:tw-no-underline focus:tw-no-underline tw-justify-center"
139
+ class="tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline tw-justify-center"
140
140
  aria-label="Loan tag"
141
141
  @click.native="clickReadMore('Tag', $event)"
142
142
  >
@@ -151,7 +151,7 @@
151
151
  :is="tag"
152
152
  :to="readMorePath"
153
153
  :href="readMorePath"
154
- class="loan-card-use tw-text-primary"
154
+ class="loan-card-use tw-text-primary tw-no-underline"
155
155
  aria-label="Loan use"
156
156
  @click.native="clickReadMore('Use', $event)"
157
157
  >
@@ -433,6 +433,7 @@ export default {
433
433
  .loan-card-active-hover:hover .loan-card-use, .loan-card-active-hover:hover .loan-card-name {
434
434
  @apply tw-underline;
435
435
  }
436
+ .loan-card-progress,
436
437
  .loan-card-progress:hover,
437
438
  .loan-card-progress:focus {
438
439
  @apply tw-no-underline;
@@ -2,9 +2,9 @@
2
2
  <button
3
3
  :id="`kv-tab-${forPanel}`"
4
4
  class="tw-text-h3 tw-mb-1.5 tw-whitespace-nowrap tw-text-left"
5
- :class="{ 'hover:tw-text-action-highlight' : !isActive,
5
+ :class="{ 'hover:tw-text-action' : !isActive,
6
6
  'md:tw-border-l-2 tw-border-transparent md:tw-pl-2' : vertical,
7
- 'tw-text-action-highlight' : isActive && vertical
7
+ 'tw-text-action' : isActive && vertical
8
8
  }"
9
9
  role="tab"
10
10
  :aria-selected="isActive"
@@ -22,7 +22,7 @@
22
22
  tw-bg-primary-inverse tw-rounded-full
23
23
  tw-origin-left tw-transition-all tw-duration-300
24
24
  "
25
- :class="{ 'tw-hidden md:tw-block tw-top-0 md:tw-bg-action-highlight' : vertical}"
25
+ :class="{ 'tw-hidden md:tw-block tw-top-0 md:tw-bg-action' : vertical}"
26
26
  :style="`
27
27
  width: ${selectedTabEl && !vertical ? selectedTabEl.clientWidth : 3}px;
28
28
  height: ${selectedTabEl && vertical ? `${selectedTabEl.clientHeight}px` : '0.25rem'};
@@ -16,16 +16,19 @@
16
16
  class="
17
17
  tw-h-6 tw-w-full
18
18
  tw-px-2
19
- tw-border tw-border-tertiary
19
+ tw-border
20
20
  tw-rounded-sm
21
21
  tw-appearance-none
22
22
  tw-text-base
23
- tw-bg-primary
24
23
  tw-ring-inset
25
- focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-action focus:tw-border-transparent
24
+ focus:tw-outline-none focus:tw-ring-2 focus:tw-border-transparent
26
25
  "
27
26
  :class="{
28
- 'tw-pr-6 tw-bg-danger tw-border-danger-highlight tw-bg-opacity-low focus:tw-ring-danger-highlight'
27
+ 'tw-bg-primary'
28
+ : valid && !disabled,
29
+ 'tw-border-tertiary focus:tw-ring-action'
30
+ : valid,
31
+ 'tw-pr-6 tw-bg-danger-highlight tw-border-danger focus:tw-ring-danger-highlight'
29
32
  : !valid,
30
33
  'tw-bg-tertiary'
31
34
  : disabled,
@@ -64,7 +67,7 @@
64
67
  </button>
65
68
  <div
66
69
  v-if="$slots.error"
67
- class="tw-text-danger tw-text-small tw-font-medium tw-mt-1"
70
+ class="tw-text-danger-highlight tw-text-small tw-font-medium tw-mt-1"
68
71
  >
69
72
  <!-- @slot Used in conjuction with the `valid` prop to tell the user what must be fixed -->
70
73
  <slot name="error"></slot>
@@ -100,7 +100,7 @@
100
100
  :is="tag"
101
101
  :to="readMorePath"
102
102
  :href="readMorePath"
103
- class="tw-flex hover:tw-no-underline focus:tw-no-underline"
103
+ class="tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline"
104
104
  aria-label="Loan tag"
105
105
  @click.native="clickReadMore('Tag', $event)"
106
106
  >
@@ -114,7 +114,7 @@
114
114
  :is="tag"
115
115
  :to="readMorePath"
116
116
  :href="readMorePath"
117
- class="loan-card-use tw-text-primary"
117
+ class="loan-card-use tw-no-underline tw-text-primary"
118
118
  aria-label="Loan use"
119
119
  @click="clickReadMore('Use')"
120
120
  >
@@ -421,6 +421,7 @@ export default {
421
421
  .loan-card-active-hover:hover .loan-card-use {
422
422
  @apply tw-underline;
423
423
  }
424
+ .loan-card-progress,
424
425
  .loan-card-progress:hover,
425
426
  .loan-card-progress:focus {
426
427
  @apply tw-no-underline;
@@ -1,6 +1,16 @@
1
1
  import primitives from '@kiva/kv-tokens/primitives.json';
2
2
  import {
3
- defaultTheme, darkTheme, darkGreenTheme, mintTheme, darkMintTheme, darkStoneTheme,
3
+ defaultTheme,
4
+ greenLightTheme,
5
+ greenDarkTheme,
6
+ marigoldLightTheme,
7
+ stoneLightTheme,
8
+ stoneDarkTheme,
9
+ darkTheme,
10
+ darkGreenTheme,
11
+ mintTheme,
12
+ darkMintTheme,
13
+ darkStoneTheme,
4
14
  } from '@kiva/kv-tokens/configs/kivaColors.cjs';
5
15
  import KvButton from '../KvButton.vue';
6
16
  import KvGrid from '../KvGrid.vue';
@@ -94,12 +104,12 @@ const demoTemplate = `
94
104
  <section>
95
105
  <ul>
96
106
  <li
97
- v-for="variant in ['primary', 'secondary', 'link', 'danger', 'ghost']"
107
+ v-for="variant in ['primary', 'secondary', 'link', 'danger', 'caution', 'ghost']"
98
108
  :key="variant"
99
109
  class="tw-mb-2"
100
110
  >
101
111
  <kv-button :variant="variant">
102
- Find a borrower
112
+ {{ variant }}
103
113
  </kv-button>
104
114
  </li>
105
115
  </ul>
@@ -138,6 +148,31 @@ const Template = (args, {
138
148
 
139
149
  export const Default = Template.bind({});
140
150
 
151
+ export const GreenLight = Template.bind({});
152
+ GreenLight.args = {
153
+ theme: greenLightTheme,
154
+ };
155
+
156
+ export const GreenDark = Template.bind({});
157
+ GreenDark.args = {
158
+ theme: greenDarkTheme,
159
+ };
160
+
161
+ export const MarigoldLight = Template.bind({});
162
+ MarigoldLight.args = {
163
+ theme: marigoldLightTheme,
164
+ };
165
+
166
+ export const StoneLight = Template.bind({});
167
+ StoneLight.args = {
168
+ theme: stoneLightTheme,
169
+ };
170
+
171
+ export const StoneDark = Template.bind({});
172
+ StoneDark.args = {
173
+ theme: stoneDarkTheme,
174
+ };
175
+
141
176
  export const Dark = Template.bind({});
142
177
  Dark.args = {
143
178
  theme: darkTheme,
@@ -1,18 +1,74 @@
1
+ import {
2
+ defaultTheme,
3
+ greenLightTheme,
4
+ greenDarkTheme,
5
+ marigoldLightTheme,
6
+ stoneLightTheme,
7
+ stoneDarkTheme,
8
+ darkTheme,
9
+ darkGreenTheme,
10
+ mintTheme,
11
+ darkMintTheme,
12
+ darkStoneTheme,
13
+ } from '@kiva/kv-tokens/configs/kivaColors.cjs';
1
14
  import KvGrid from '../KvGrid.vue';
2
15
  import KvPageContainer from '../KvPageContainer.vue';
3
16
 
4
17
  export default {
5
18
  title: 'Base Styling/Prose Demo',
19
+ args: {
20
+ theme: 'greenLight',
21
+ },
22
+ argTypes: {
23
+ theme: {
24
+ control: {
25
+ type: 'select',
26
+ },
27
+ options: ['default', 'greenLight', 'greenDark', 'marigoldLight', 'stoneLight', 'stoneDark', 'dark', 'darkGreen', 'mint', 'darkMint', 'darkStone'],
28
+ },
29
+ },
6
30
  };
7
31
 
8
32
  export const ProseDemo = (args, { argTypes }) => ({
9
33
  props: Object.keys(argTypes),
10
34
  components: { KvPageContainer, KvGrid },
35
+ computed: {
36
+ themeStyles() {
37
+ switch (this.theme) {
38
+ case 'greenLight':
39
+ return greenLightTheme;
40
+ case 'greenDark':
41
+ return greenDarkTheme;
42
+ case 'marigoldLight':
43
+ return marigoldLightTheme;
44
+ case 'stoneLight':
45
+ return stoneLightTheme;
46
+ case 'stoneDark':
47
+ return stoneDarkTheme;
48
+ case 'dark':
49
+ return darkTheme;
50
+ case 'darkGreen':
51
+ return darkGreenTheme;
52
+ case 'mint':
53
+ return mintTheme;
54
+ case 'darkMint':
55
+ return darkMintTheme;
56
+ case 'darkStone':
57
+ return darkStoneTheme;
58
+ default:
59
+ return defaultTheme;
60
+ }
61
+ },
62
+ },
11
63
  template: `
12
- <kv-page-container>
64
+ <kv-page-container :style="{
65
+ ...themeStyles,
66
+ color: 'rgb(var(--text-primary))',
67
+ backgroundColor: 'rgb(var(--bg-primary))',
68
+ }">
13
69
  <kv-grid class="tw-grid-cols-12 tw-prose">
14
70
  <div class="tw-col-span-full md:tw-col-span-10 md:tw-col-start-2 lg:tw-col-span-8 lg:tw-col-start-3">
15
- <h1>Typography</h1>
71
+ <h1><u>Typography</u></h1>
16
72
  <p class="tw-text-subhead">Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS.</p>
17
73
  <p>By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you <em>really are</em> just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive.</p>
18
74
  <p>We get lots of complaints about it actually, with people regularly asking us things like:</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "3.107.1",
3
+ "version": "3.108.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -61,7 +61,7 @@
61
61
  "build": "tsup utils/*.js --outDir dist/utils --format cjs,esm --clean && cp -R vue/ dist/components/ && cp -R data/ dist/data/"
62
62
  },
63
63
  "dependencies": {
64
- "@kiva/kv-tokens": "^2.13.0",
64
+ "@kiva/kv-tokens": "^2.14.0",
65
65
  "@mdi/js": "^5.9.55",
66
66
  "@vueuse/integrations": "^7.6.0",
67
67
  "aria-hidden": "^1.1.3",
@@ -80,6 +80,10 @@
80
80
  ".": {
81
81
  "require": "./dist/utils/index.cjs",
82
82
  "import": "./dist/utils/index.js"
83
+ },
84
+ "./dist/components/*.vue": {
85
+ "import": "./dist/components/*.vue",
86
+ "require": "./dist/components/*.vue"
83
87
  }
84
88
  },
85
89
  "peerDependencies": {
@@ -91,5 +95,5 @@
91
95
  "optional": true
92
96
  }
93
97
  },
94
- "gitHead": "67f58ecf75cd42443ac05f21da2b05290e131e2d"
98
+ "gitHead": "081b5ca9ae74b85b3db13f40043252381f0ab822"
95
99
  }
@@ -7,6 +7,10 @@ const config = {
7
7
  '../stories/**/*.stories.@(js|jsx|ts|tsx)'
8
8
  ],
9
9
 
10
+ staticDirs: [
11
+ '../../../../dist/assets',
12
+ ],
13
+
10
14
  addons: [
11
15
  "@storybook/addon-links",
12
16
  "@storybook/addon-essentials",
@@ -23,7 +27,7 @@ const config = {
23
27
  'style-loader',
24
28
  {
25
29
  loader: 'css-loader',
26
- options: { importLoaders: 1 }
30
+ options: { importLoaders: 1, url: false }
27
31
  },
28
32
  {
29
33
  // Gets options from `postcss.config.js` in your project root
package/vue/KvButton.vue CHANGED
@@ -5,7 +5,7 @@
5
5
  :to="to"
6
6
  :type="computedType"
7
7
  :disabled="isDisabled"
8
- class="hover:tw-no-underline focus:tw-no-underline tw-inline-block"
8
+ class="tw-no-underline hover:tw-no-underline focus:tw-no-underline tw-inline-block"
9
9
  :class="{
10
10
  'tw-opacity-low': state === 'disabled',
11
11
  'tw-pointer-events-none': state === 'loading' || isDisabled
@@ -137,16 +137,16 @@ export default {
137
137
  }
138
138
  break;
139
139
  case 'secondary':
140
- classes = 'tw-text-primary';
140
+ classes = 'tw-text-action-highlight';
141
141
  if (state.value === 'active') {
142
- classes = `${classes} tw-bg-secondary tw-border-primary`;
142
+ classes = `${classes} tw-bg-secondary`;
143
143
  } else {
144
144
  // eslint-disable-next-line max-len
145
- classes = `${classes} tw-bg-primary hover:tw-bg-secondary tw-border-tertiary hover:tw-border-primary`;
145
+ classes = `${classes} tw-bg-primary hover:tw-bg-secondary tw-border-action-highlight`;
146
146
  }
147
147
  break;
148
148
  case 'danger':
149
- classes = 'tw-text-primary-inverse';
149
+ classes = 'tw-text-danger';
150
150
  if (state.value === 'active') {
151
151
  classes = `${classes} tw-bg-danger-highlight tw-border-danger-highlight`;
152
152
  } else {
@@ -157,9 +157,9 @@ export default {
157
157
  case 'link':
158
158
  classes = 'tw-bg-primary-inverse tw-text-primary-inverse';
159
159
  if (state.value === 'active') {
160
- classes = `${classes} tw-border-secondary`;
160
+ classes = `${classes} tw-border-secondary tw-bg-action`;
161
161
  } else {
162
- classes = `${classes} tw-border-primary hover:tw-border-secondary`;
162
+ classes = `${classes} tw-border-action-highlight hover:tw-border-action hover:tw-bg-action`;
163
163
  }
164
164
  break;
165
165
  case 'ghost':
@@ -171,11 +171,12 @@ export default {
171
171
  }
172
172
  break;
173
173
  case 'caution':
174
- classes = 'tw-text-primary tw-border-transparent';
174
+ classes = 'tw-text-caution';
175
175
  if (state.value === 'active') {
176
- classes = `${classes} tw-bg-caution-highlight`;
176
+ classes = `${classes} tw-bg-caution-highlight tw-border-caution-highlight`;
177
177
  } else {
178
- classes = `${classes} tw-bg-caution hover:tw-bg-caution-highlight`;
178
+ // eslint-disable-next-line max-len
179
+ classes = `${classes} tw-bg-caution hover:tw-bg-caution-highlight tw-border-caution hover:tw-border-caution-highlight`;
179
180
  }
180
181
  break;
181
182
  }
@@ -90,7 +90,7 @@
90
90
  :is="tag"
91
91
  :to="readMorePath"
92
92
  :href="readMorePath"
93
- class="tw-flex hover:tw-no-underline focus:tw-no-underline"
93
+ class="tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline"
94
94
  :class="{ 'tw-px-1': largeCard }"
95
95
  aria-label="Loan tag"
96
96
  @click.native="clickReadMore('Tag', $event)"
@@ -105,7 +105,7 @@
105
105
  :is="tag"
106
106
  :to="readMorePath"
107
107
  :href="readMorePath"
108
- class="loan-card-use tw-text-primary"
108
+ class="loan-card-use tw-no-underline tw-text-primary"
109
109
  aria-label="Loan use"
110
110
  @click.native="clickReadMore('Use', $event)"
111
111
  >
@@ -183,7 +183,7 @@
183
183
  v-if="unreservedAmount > 0"
184
184
  :to="readMorePath"
185
185
  :href="readMorePath"
186
- class="loan-card-progress tw-mt-1"
186
+ class="loan-card-progress tw-no-underline tw-mt-1"
187
187
  aria-label="Loan progress"
188
188
  @click.native="clickReadMore('Progress', $event)"
189
189
  >
@@ -96,7 +96,7 @@
96
96
  :to="readMorePath"
97
97
  :href="readMorePath"
98
98
  aria-label="Borrower name"
99
- class="!tw-text-primary"
99
+ class="!tw-text-primary tw-no-underline"
100
100
  @click.native="clickReadMore('Name', $event)"
101
101
  >
102
102
  <h3
@@ -136,7 +136,7 @@
136
136
  v-else
137
137
  :to="readMorePath"
138
138
  :href="readMorePath"
139
- class="tw-flex hover:tw-no-underline focus:tw-no-underline tw-justify-center"
139
+ class="tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline tw-justify-center"
140
140
  aria-label="Loan tag"
141
141
  @click.native="clickReadMore('Tag', $event)"
142
142
  >
@@ -151,7 +151,7 @@
151
151
  :is="tag"
152
152
  :to="readMorePath"
153
153
  :href="readMorePath"
154
- class="loan-card-use tw-text-primary"
154
+ class="loan-card-use tw-text-primary tw-no-underline"
155
155
  aria-label="Loan use"
156
156
  @click.native="clickReadMore('Use', $event)"
157
157
  >
@@ -433,6 +433,7 @@ export default {
433
433
  .loan-card-active-hover:hover .loan-card-use, .loan-card-active-hover:hover .loan-card-name {
434
434
  @apply tw-underline;
435
435
  }
436
+ .loan-card-progress,
436
437
  .loan-card-progress:hover,
437
438
  .loan-card-progress:focus {
438
439
  @apply tw-no-underline;
package/vue/KvTab.vue CHANGED
@@ -2,9 +2,9 @@
2
2
  <button
3
3
  :id="`kv-tab-${forPanel}`"
4
4
  class="tw-text-h3 tw-mb-1.5 tw-whitespace-nowrap tw-text-left"
5
- :class="{ 'hover:tw-text-action-highlight' : !isActive,
5
+ :class="{ 'hover:tw-text-action' : !isActive,
6
6
  'md:tw-border-l-2 tw-border-transparent md:tw-pl-2' : vertical,
7
- 'tw-text-action-highlight' : isActive && vertical
7
+ 'tw-text-action' : isActive && vertical
8
8
  }"
9
9
  role="tab"
10
10
  :aria-selected="isActive"
package/vue/KvTabs.vue CHANGED
@@ -22,7 +22,7 @@
22
22
  tw-bg-primary-inverse tw-rounded-full
23
23
  tw-origin-left tw-transition-all tw-duration-300
24
24
  "
25
- :class="{ 'tw-hidden md:tw-block tw-top-0 md:tw-bg-action-highlight' : vertical}"
25
+ :class="{ 'tw-hidden md:tw-block tw-top-0 md:tw-bg-action' : vertical}"
26
26
  :style="`
27
27
  width: ${selectedTabEl && !vertical ? selectedTabEl.clientWidth : 3}px;
28
28
  height: ${selectedTabEl && vertical ? `${selectedTabEl.clientHeight}px` : '0.25rem'};
@@ -16,16 +16,19 @@
16
16
  class="
17
17
  tw-h-6 tw-w-full
18
18
  tw-px-2
19
- tw-border tw-border-tertiary
19
+ tw-border
20
20
  tw-rounded-sm
21
21
  tw-appearance-none
22
22
  tw-text-base
23
- tw-bg-primary
24
23
  tw-ring-inset
25
- focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-action focus:tw-border-transparent
24
+ focus:tw-outline-none focus:tw-ring-2 focus:tw-border-transparent
26
25
  "
27
26
  :class="{
28
- 'tw-pr-6 tw-bg-danger tw-border-danger-highlight tw-bg-opacity-low focus:tw-ring-danger-highlight'
27
+ 'tw-bg-primary'
28
+ : valid && !disabled,
29
+ 'tw-border-tertiary focus:tw-ring-action'
30
+ : valid,
31
+ 'tw-pr-6 tw-bg-danger-highlight tw-border-danger focus:tw-ring-danger-highlight'
29
32
  : !valid,
30
33
  'tw-bg-tertiary'
31
34
  : disabled,
@@ -64,7 +67,7 @@
64
67
  </button>
65
68
  <div
66
69
  v-if="$slots.error"
67
- class="tw-text-danger tw-text-small tw-font-medium tw-mt-1"
70
+ class="tw-text-danger-highlight tw-text-small tw-font-medium tw-mt-1"
68
71
  >
69
72
  <!-- @slot Used in conjuction with the `valid` prop to tell the user what must be fixed -->
70
73
  <slot name="error"></slot>
@@ -100,7 +100,7 @@
100
100
  :is="tag"
101
101
  :to="readMorePath"
102
102
  :href="readMorePath"
103
- class="tw-flex hover:tw-no-underline focus:tw-no-underline"
103
+ class="tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline"
104
104
  aria-label="Loan tag"
105
105
  @click.native="clickReadMore('Tag', $event)"
106
106
  >
@@ -114,7 +114,7 @@
114
114
  :is="tag"
115
115
  :to="readMorePath"
116
116
  :href="readMorePath"
117
- class="loan-card-use tw-text-primary"
117
+ class="loan-card-use tw-no-underline tw-text-primary"
118
118
  aria-label="Loan use"
119
119
  @click="clickReadMore('Use')"
120
120
  >
@@ -421,6 +421,7 @@ export default {
421
421
  .loan-card-active-hover:hover .loan-card-use {
422
422
  @apply tw-underline;
423
423
  }
424
+ .loan-card-progress,
424
425
  .loan-card-progress:hover,
425
426
  .loan-card-progress:focus {
426
427
  @apply tw-no-underline;
@@ -1,6 +1,16 @@
1
1
  import primitives from '@kiva/kv-tokens/primitives.json';
2
2
  import {
3
- defaultTheme, darkTheme, darkGreenTheme, mintTheme, darkMintTheme, darkStoneTheme,
3
+ defaultTheme,
4
+ greenLightTheme,
5
+ greenDarkTheme,
6
+ marigoldLightTheme,
7
+ stoneLightTheme,
8
+ stoneDarkTheme,
9
+ darkTheme,
10
+ darkGreenTheme,
11
+ mintTheme,
12
+ darkMintTheme,
13
+ darkStoneTheme,
4
14
  } from '@kiva/kv-tokens/configs/kivaColors.cjs';
5
15
  import KvButton from '../KvButton.vue';
6
16
  import KvGrid from '../KvGrid.vue';
@@ -94,12 +104,12 @@ const demoTemplate = `
94
104
  <section>
95
105
  <ul>
96
106
  <li
97
- v-for="variant in ['primary', 'secondary', 'link', 'danger', 'ghost']"
107
+ v-for="variant in ['primary', 'secondary', 'link', 'danger', 'caution', 'ghost']"
98
108
  :key="variant"
99
109
  class="tw-mb-2"
100
110
  >
101
111
  <kv-button :variant="variant">
102
- Find a borrower
112
+ {{ variant }}
103
113
  </kv-button>
104
114
  </li>
105
115
  </ul>
@@ -138,6 +148,31 @@ const Template = (args, {
138
148
 
139
149
  export const Default = Template.bind({});
140
150
 
151
+ export const GreenLight = Template.bind({});
152
+ GreenLight.args = {
153
+ theme: greenLightTheme,
154
+ };
155
+
156
+ export const GreenDark = Template.bind({});
157
+ GreenDark.args = {
158
+ theme: greenDarkTheme,
159
+ };
160
+
161
+ export const MarigoldLight = Template.bind({});
162
+ MarigoldLight.args = {
163
+ theme: marigoldLightTheme,
164
+ };
165
+
166
+ export const StoneLight = Template.bind({});
167
+ StoneLight.args = {
168
+ theme: stoneLightTheme,
169
+ };
170
+
171
+ export const StoneDark = Template.bind({});
172
+ StoneDark.args = {
173
+ theme: stoneDarkTheme,
174
+ };
175
+
141
176
  export const Dark = Template.bind({});
142
177
  Dark.args = {
143
178
  theme: darkTheme,
@@ -1,18 +1,74 @@
1
+ import {
2
+ defaultTheme,
3
+ greenLightTheme,
4
+ greenDarkTheme,
5
+ marigoldLightTheme,
6
+ stoneLightTheme,
7
+ stoneDarkTheme,
8
+ darkTheme,
9
+ darkGreenTheme,
10
+ mintTheme,
11
+ darkMintTheme,
12
+ darkStoneTheme,
13
+ } from '@kiva/kv-tokens/configs/kivaColors.cjs';
1
14
  import KvGrid from '../KvGrid.vue';
2
15
  import KvPageContainer from '../KvPageContainer.vue';
3
16
 
4
17
  export default {
5
18
  title: 'Base Styling/Prose Demo',
19
+ args: {
20
+ theme: 'greenLight',
21
+ },
22
+ argTypes: {
23
+ theme: {
24
+ control: {
25
+ type: 'select',
26
+ },
27
+ options: ['default', 'greenLight', 'greenDark', 'marigoldLight', 'stoneLight', 'stoneDark', 'dark', 'darkGreen', 'mint', 'darkMint', 'darkStone'],
28
+ },
29
+ },
6
30
  };
7
31
 
8
32
  export const ProseDemo = (args, { argTypes }) => ({
9
33
  props: Object.keys(argTypes),
10
34
  components: { KvPageContainer, KvGrid },
35
+ computed: {
36
+ themeStyles() {
37
+ switch (this.theme) {
38
+ case 'greenLight':
39
+ return greenLightTheme;
40
+ case 'greenDark':
41
+ return greenDarkTheme;
42
+ case 'marigoldLight':
43
+ return marigoldLightTheme;
44
+ case 'stoneLight':
45
+ return stoneLightTheme;
46
+ case 'stoneDark':
47
+ return stoneDarkTheme;
48
+ case 'dark':
49
+ return darkTheme;
50
+ case 'darkGreen':
51
+ return darkGreenTheme;
52
+ case 'mint':
53
+ return mintTheme;
54
+ case 'darkMint':
55
+ return darkMintTheme;
56
+ case 'darkStone':
57
+ return darkStoneTheme;
58
+ default:
59
+ return defaultTheme;
60
+ }
61
+ },
62
+ },
11
63
  template: `
12
- <kv-page-container>
64
+ <kv-page-container :style="{
65
+ ...themeStyles,
66
+ color: 'rgb(var(--text-primary))',
67
+ backgroundColor: 'rgb(var(--bg-primary))',
68
+ }">
13
69
  <kv-grid class="tw-grid-cols-12 tw-prose">
14
70
  <div class="tw-col-span-full md:tw-col-span-10 md:tw-col-start-2 lg:tw-col-span-8 lg:tw-col-start-3">
15
- <h1>Typography</h1>
71
+ <h1><u>Typography</u></h1>
16
72
  <p class="tw-text-subhead">Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS.</p>
17
73
  <p>By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you <em>really are</em> just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive.</p>
18
74
  <p>We get lots of complaints about it actually, with people regularly asking us things like:</p>