@dillingerstaffing/strand-vue 0.4.0 → 0.5.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/README.md +58 -0
- package/dist/components/CodeBlock/CodeBlock.vue.d.ts +13 -0
- package/dist/components/CodeBlock/CodeBlock.vue.d.ts.map +1 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/CodeBlock/index.d.ts.map +1 -0
- package/dist/css/strand-ui.css +49 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +310 -288
- package/dist/index.js.map +1 -1
- package/package.json +21 -5
- package/src/components/CodeBlock/CodeBlock.test.ts +92 -0
- package/src/components/CodeBlock/CodeBlock.vue +30 -0
- package/src/components/CodeBlock/index.ts +1 -0
- package/src/index.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @dillingerstaffing/strand-vue
|
|
2
|
+
|
|
3
|
+
Vue 3 component library built on the [Strand Design Language](https://github.com/dillingerstaffing/strand/blob/main/DESIGN_LANGUAGE.md). 31 components. Zero-runtime CSS. WCAG 2.2 AA.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @dillingerstaffing/strand @dillingerstaffing/strand-vue
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Import CSS in your app entry point:
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
@import '@dillingerstaffing/strand/css/reset.css';
|
|
15
|
+
@import '@dillingerstaffing/strand/css/tokens.css';
|
|
16
|
+
@import '@dillingerstaffing/strand/css/base.css';
|
|
17
|
+
@import '@dillingerstaffing/strand-vue/css/strand-ui.css';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use components:
|
|
21
|
+
|
|
22
|
+
```vue
|
|
23
|
+
<script setup>
|
|
24
|
+
import { Button, Card, Stack, Input } from '@dillingerstaffing/strand-vue'
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<Card variant="elevated" padding="lg">
|
|
29
|
+
<Stack :gap="4">
|
|
30
|
+
<Input placeholder="Enter your email" />
|
|
31
|
+
<Button variant="primary">Get Started</Button>
|
|
32
|
+
</Stack>
|
|
33
|
+
</Card>
|
|
34
|
+
</template>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Components
|
|
38
|
+
|
|
39
|
+
31 components across 5 categories. Every component includes all interaction states, keyboard navigation, ARIA compliance, and `prefers-reduced-motion` support.
|
|
40
|
+
|
|
41
|
+
**Input:** Button, Input, Textarea, Select, Checkbox, Radio, Switch, Slider, FormField
|
|
42
|
+
**Display:** Card, Badge, Avatar, Tag, Table, DataReadout
|
|
43
|
+
**Layout:** Stack, Grid, Container, Divider, Section
|
|
44
|
+
**Navigation:** Link, Tabs, Breadcrumb, Nav
|
|
45
|
+
**Feedback:** Toast, Alert, Dialog, Tooltip, Progress, Spinner, Skeleton
|
|
46
|
+
|
|
47
|
+
## Same CSS, Different Framework
|
|
48
|
+
|
|
49
|
+
This package produces identical visual output to [@dillingerstaffing/strand-ui](https://www.npmjs.com/package/@dillingerstaffing/strand-ui) (Preact/React). Same CSS classes, same ARIA attributes, same design tokens. The only difference is the framework binding.
|
|
50
|
+
|
|
51
|
+
## Links
|
|
52
|
+
|
|
53
|
+
- [GitHub](https://github.com/dillingerstaffing/strand)
|
|
54
|
+
- [Design Language](https://github.com/dillingerstaffing/strand/blob/main/DESIGN_LANGUAGE.md)
|
|
55
|
+
- [HTML Reference (CSS-only API)](https://github.com/dillingerstaffing/strand/blob/main/HTML_REFERENCE.md)
|
|
56
|
+
- [Documentation](https://dillingerstaffing.com/labs/strand)
|
|
57
|
+
|
|
58
|
+
Created by [Dillinger Staffing](https://dillingerstaffing.com)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** The code content to display */
|
|
3
|
+
code: string;
|
|
4
|
+
/** Optional language label (e.g. "html", "css", "bash") */
|
|
5
|
+
language?: string;
|
|
6
|
+
/** Additional CSS class */
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
10
|
+
className: string;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=CodeBlock.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/CodeBlock.vue"],"names":[],"mappings":"AACA;AAkCA,UAAU,KAAK;IACb,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;;eADa,MAAM;;AAqEpB,wBAQG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/css/strand-ui.css
CHANGED
|
@@ -647,6 +647,55 @@
|
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
|
|
650
|
+
/* CodeBlock */
|
|
651
|
+
/*! Strand UI | MIT License | dillingerstaffing.com */
|
|
652
|
+
|
|
653
|
+
/*! Strand UI | MIT License | dillingerstaffing.com */
|
|
654
|
+
|
|
655
|
+
/* ── Layout ── */
|
|
656
|
+
.strand-code-block {
|
|
657
|
+
position: relative;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/* ── Label (optional language indicator) ── */
|
|
661
|
+
.strand-code-block__label {
|
|
662
|
+
display: block;
|
|
663
|
+
font-family: var(--strand-font-mono);
|
|
664
|
+
font-size: var(--strand-text-xs);
|
|
665
|
+
font-weight: var(--strand-weight-medium);
|
|
666
|
+
letter-spacing: var(--strand-tracking-widest);
|
|
667
|
+
text-transform: uppercase;
|
|
668
|
+
color: var(--strand-gray-500);
|
|
669
|
+
margin-bottom: var(--strand-space-2);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/* ── Code area ── */
|
|
673
|
+
.strand-code-block__pre {
|
|
674
|
+
font-family: var(--strand-font-mono);
|
|
675
|
+
font-size: var(--strand-text-sm);
|
|
676
|
+
line-height: var(--strand-leading-relaxed);
|
|
677
|
+
color: var(--strand-blue-midnight);
|
|
678
|
+
background: var(--strand-surface-recessed);
|
|
679
|
+
box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
|
|
680
|
+
border-radius: var(--strand-radius-lg);
|
|
681
|
+
padding: var(--strand-space-3) var(--strand-space-4);
|
|
682
|
+
overflow-x: auto;
|
|
683
|
+
white-space: pre;
|
|
684
|
+
tab-size: 2;
|
|
685
|
+
margin: 0;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/* ── Inline code ── */
|
|
689
|
+
.strand-code-inline {
|
|
690
|
+
font-family: var(--strand-font-mono);
|
|
691
|
+
font-size: 0.875em;
|
|
692
|
+
color: var(--strand-blue-deep);
|
|
693
|
+
background: var(--strand-surface-recessed);
|
|
694
|
+
padding: 0.125em 0.375em;
|
|
695
|
+
border-radius: var(--strand-radius-sm);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
|
|
650
699
|
/* Container */
|
|
651
700
|
/*! Strand UI | MIT License | dillingerstaffing.com */
|
|
652
701
|
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { default as Avatar } from './components/Avatar/Avatar.vue';
|
|
|
14
14
|
export { default as Tag } from './components/Tag/Tag.vue';
|
|
15
15
|
export { default as Table } from './components/Table/Table.vue';
|
|
16
16
|
export { default as DataReadout } from './components/DataReadout/DataReadout.vue';
|
|
17
|
+
export { default as CodeBlock } from './components/CodeBlock/CodeBlock.vue';
|
|
17
18
|
export { default as Stack } from './components/Stack/Stack.vue';
|
|
18
19
|
export { default as Grid } from './components/Grid/Grid.vue';
|
|
19
20
|
export { default as Container } from './components/Container/Container.vue';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAGvD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAG5E,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO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