@flightlesslabs/dodo-ui 1.0.0--beta-2 → 1.0.0--beta-3
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 +1 -1
- package/dist/Home.mdx +3 -2
- package/dist/components/Form/Button/Button.svelte +1 -2
- package/dist/components/Form/Button/Button.svelte.d.ts +0 -1
- package/dist/components/Form/InputEnclosure/InputEnclosure.svelte +1 -2
- package/dist/components/Form/InputEnclosure/InputEnclosure.svelte.d.ts +0 -1
- package/dist/components/Form/TextInput/TextInput.svelte +1 -2
- package/dist/components/Form/TextInput/TextInput.svelte.d.ts +0 -1
- package/dist/index.d.ts +19 -6
- package/dist/index.js +22 -3
- package/dist/styles/components.scss +3 -0
- package/dist/styles/global/index.scss +7 -0
- package/package.json +9 -8
- package/src/lib/Home.mdx +3 -2
- package/src/lib/components/Form/Button/Button.svelte +0 -1
- package/src/lib/components/Form/InputEnclosure/InputEnclosure.svelte +0 -1
- package/src/lib/components/Form/TextInput/TextInput.svelte +0 -1
- package/src/lib/index.ts +59 -16
- package/src/lib/styles/components.scss +3 -0
- package/src/lib/styles/global/index.scss +7 -0
- package/dist/components/Form/index.d.ts +0 -3
- package/dist/components/Form/index.js +0 -3
- package/dist/styles/global.css +0 -7
- package/dist/styles/scss/index.scss +0 -1
- package/src/lib/components/Form/index.ts +0 -18
- package/src/lib/styles/global.css +0 -7
- package/src/lib/styles/scss/index.scss +0 -1
- /package/dist/styles/{_colors-base.css → global/_colors-base.scss} +0 -0
- /package/dist/styles/{_colors.css → global/_colors.scss} +0 -0
- /package/dist/styles/{_components.css → global/_components.scss} +0 -0
- /package/dist/styles/{_minimal-reset.css → global/_minimal-reset.scss} +0 -0
- /package/dist/styles/{_shadow.css → global/_shadow.scss} +0 -0
- /package/dist/styles/{_space.css → global/_space.scss} +0 -0
- /package/dist/styles/{_z-index.css → global/_z-index.scss} +0 -0
- /package/dist/styles/scss/{_breakpoints.scss → variables/_breakpoints.scss} +0 -0
- /package/src/lib/styles/{_colors-base.css → global/_colors-base.scss} +0 -0
- /package/src/lib/styles/{_colors.css → global/_colors.scss} +0 -0
- /package/src/lib/styles/{_components.css → global/_components.scss} +0 -0
- /package/src/lib/styles/{_minimal-reset.css → global/_minimal-reset.scss} +0 -0
- /package/src/lib/styles/{_shadow.css → global/_shadow.scss} +0 -0
- /package/src/lib/styles/{_space.css → global/_space.scss} +0 -0
- /package/src/lib/styles/{_z-index.css → global/_z-index.scss} +0 -0
- /package/src/lib/styles/scss/{_breakpoints.scss → variables/_breakpoints.scss} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Dodo Ui
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Opinionated UI framework for Svelte, based on [Bits UI](https://bits-ui.com/)
|
|
6
6
|
|
|
7
7
|
[Github](https://github.com/flightlesslabs/dodo-ui) | [npm](https://www.npmjs.com/package/@flightlesslabs/dodo-ui)
|
|
8
8
|
|
package/dist/Home.mdx
CHANGED
|
@@ -10,7 +10,7 @@ import item from '../../package.json?raw';
|
|
|
10
10
|
<h3 style={{ fontWeight: 500 }}>v{JSON.parse(item)?.version}</h3>
|
|
11
11
|
|
|
12
12
|
<h3 style={{ fontWeight: 400 }}>
|
|
13
|
-
|
|
13
|
+
Opinionated UI framework for Svelte, based on [Bits UI](https://bits-ui.com/)
|
|
14
14
|
</h3>
|
|
15
15
|
|
|
16
16
|
### [Github](https://github.com/flightlesslabs/dodo-ui) - [npm](https://www.npmjs.com/package/@flightlesslabs/dodo-ui)
|
|
@@ -30,7 +30,7 @@ pnpm add bits-ui @flightlesslabs/dodo-ui
|
|
|
30
30
|
`}
|
|
31
31
|
/>
|
|
32
32
|
|
|
33
|
-
We are using bits-ui@{JSON.parse(item).devDependencies['bits-ui']} internally
|
|
33
|
+
We are using **bits-ui@{JSON.parse(item).devDependencies['bits-ui']}** internally
|
|
34
34
|
|
|
35
35
|
## Add css
|
|
36
36
|
|
|
@@ -41,6 +41,7 @@ Add global css in your `+layout.svelte` file
|
|
|
41
41
|
language="js"
|
|
42
42
|
code={`
|
|
43
43
|
import '@flightlesslabs/dodo-ui/styles/global.css';
|
|
44
|
+
import '@flightlesslabs/dodo-ui/styles/components.css';
|
|
44
45
|
`}
|
|
45
46
|
/>
|
|
46
47
|
|
|
@@ -66,7 +66,6 @@ export type ButtonAsAnchorProps = ButtonBaseProps & Omit<HTMLAnchorAttributes, '
|
|
|
66
66
|
* - When `href` is absent, button props are enabled and anchor-only props are disabled.
|
|
67
67
|
*/
|
|
68
68
|
export type ButtonProps = ButtonAsButtonProps | ButtonAsAnchorProps;
|
|
69
|
-
import './Button.scss';
|
|
70
69
|
import type { ComponentSize } from '../../../attributes/size.js';
|
|
71
70
|
import type { ComponentColor } from '../../../attributes/color.js';
|
|
72
71
|
import type { ComponentRoundness } from '../../../attributes/roundness.js';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>export {};
|
|
2
2
|
</script>
|
|
3
3
|
|
|
4
|
-
<script lang="ts">import './
|
|
5
|
-
import InputAffix from './InputAffix.svelte';
|
|
4
|
+
<script lang="ts">import InputAffix from './InputAffix.svelte';
|
|
6
5
|
/**
|
|
7
6
|
* InputEnclosure component runtime props.
|
|
8
7
|
*
|
|
@@ -56,7 +56,6 @@ interface InputEnclosureBaseProps {
|
|
|
56
56
|
* Inherits all native HTML div attributes (e.g. id, style, data-*, aria-*).
|
|
57
57
|
*/
|
|
58
58
|
export type InputEnclosureProps = InputEnclosureBaseProps & HTMLAttributes<HTMLDivElement>;
|
|
59
|
-
import './InputEnclosure.scss';
|
|
60
59
|
import type { ComponentSize } from '../../../attributes/size.js';
|
|
61
60
|
import type { ComponentRoundnessShape } from '../../../attributes/roundness.js';
|
|
62
61
|
declare const InputEnclosure: import("svelte").Component<InputEnclosureProps, {}, "ref">;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts" module>export {};
|
|
2
2
|
</script>
|
|
3
3
|
|
|
4
|
-
<script lang="ts">import '
|
|
5
|
-
import InputEnclosure from '../InputEnclosure/InputEnclosure.svelte';
|
|
4
|
+
<script lang="ts">import InputEnclosure from '../InputEnclosure/InputEnclosure.svelte';
|
|
6
5
|
let { ref = $bindable(), size = 'normal', roundness = 1, outline = true, class: className = '', disabled = false, error = false, focused: forcedFocused = false, before, after, onfocus, onblur, ...restProps } = $props();
|
|
7
6
|
/**
|
|
8
7
|
* Local focus state used to drive InputEnclosure focus styling.
|
|
@@ -59,7 +59,6 @@ interface TextInputBaseProps {
|
|
|
59
59
|
* Inherits all native HTML input attributes (placeholder, value, name, etc.).
|
|
60
60
|
*/
|
|
61
61
|
export type TextInputProps = TextInputBaseProps & Omit<HTMLInputAttributes, 'size' | 'children'>;
|
|
62
|
-
import './TextInput.scss';
|
|
63
62
|
import type { ComponentSize } from '../../../attributes/size.js';
|
|
64
63
|
import type { ComponentRoundnessShape } from '../../../attributes/roundness.js';
|
|
65
64
|
declare const TextInput: import("svelte").Component<TextInputProps, {}, "ref">;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Button component and related prop types.
|
|
3
3
|
*/
|
|
4
|
-
export { Button } from './components/Form/
|
|
5
|
-
export type { ButtonAsButtonProps, ButtonAsAnchorProps, ButtonProps, } from './components/Form/index.js';
|
|
4
|
+
export { default as Button, type ButtonAsButtonProps, type ButtonAsAnchorProps, type ButtonProps, } from './components/Form/Button/Button.svelte';
|
|
6
5
|
/**
|
|
7
6
|
* TextInput component and related types/events.
|
|
8
7
|
*/
|
|
9
|
-
export { TextInput } from './components/Form/
|
|
10
|
-
export type { TextInputEvent, TextInputFocusEvent, TextInputProps, } from './components/Form/index.js';
|
|
8
|
+
export { default as TextInput, type TextInputEvent, type TextInputFocusEvent, type TextInputProps, } from './components/Form/TextInput/TextInput.svelte';
|
|
11
9
|
/**
|
|
12
10
|
* InputEnclosure component and related prop types.
|
|
13
11
|
*/
|
|
14
|
-
export { InputEnclosure } from './components/Form/
|
|
15
|
-
|
|
12
|
+
export { default as InputEnclosure, type InputEnclosureProps, } from './components/Form/InputEnclosure/InputEnclosure.svelte';
|
|
13
|
+
/**
|
|
14
|
+
* color attribute related prop types.
|
|
15
|
+
*/
|
|
16
|
+
export { COMPONENT_COLOR, componentColorOptions, componentColorPriorityOptions, componentColorSeverityOptions, type ComponentColorPriority, type ComponentColorSeverity, type ComponentColor, } from './attributes/color.js';
|
|
17
|
+
/**
|
|
18
|
+
* roundness attribute related prop types.
|
|
19
|
+
*/
|
|
20
|
+
export { COMPONENT_ROUNDNESS, componentRoundnessNumericalOptions, componenRoundnessShapeOptions, componentRoundnessOptions, type ComponentRoundnessNumerical, type ComponentRoundnessShape, type ComponentRoundness, } from './attributes/roundness.js';
|
|
21
|
+
/**
|
|
22
|
+
* size attribute related prop types.
|
|
23
|
+
*/
|
|
24
|
+
export { COMPONENT_SIZE, componentSizeOptions, type ComponentSize } from './attributes/size.js';
|
|
25
|
+
/**
|
|
26
|
+
* variant attribute related prop types.
|
|
27
|
+
*/
|
|
28
|
+
export { COMPONENT_VARIANT, componentVariantOptions, type ComponentVariant, } from './attributes/variant.js';
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,31 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Button component and related prop types.
|
|
6
6
|
*/
|
|
7
|
-
export { Button } from './components/Form/
|
|
7
|
+
export { default as Button, } from './components/Form/Button/Button.svelte';
|
|
8
8
|
/**
|
|
9
9
|
* TextInput component and related types/events.
|
|
10
10
|
*/
|
|
11
|
-
export { TextInput } from './components/Form/
|
|
11
|
+
export { default as TextInput, } from './components/Form/TextInput/TextInput.svelte';
|
|
12
12
|
/**
|
|
13
13
|
* InputEnclosure component and related prop types.
|
|
14
14
|
*/
|
|
15
|
-
export { InputEnclosure } from './components/Form/
|
|
15
|
+
export { default as InputEnclosure, } from './components/Form/InputEnclosure/InputEnclosure.svelte';
|
|
16
|
+
// =====================================================
|
|
17
|
+
// attributes – Public API
|
|
18
|
+
// =====================================================
|
|
19
|
+
/**
|
|
20
|
+
* color attribute related prop types.
|
|
21
|
+
*/
|
|
22
|
+
export { COMPONENT_COLOR, componentColorOptions, componentColorPriorityOptions, componentColorSeverityOptions, } from './attributes/color.js';
|
|
23
|
+
/**
|
|
24
|
+
* roundness attribute related prop types.
|
|
25
|
+
*/
|
|
26
|
+
export { COMPONENT_ROUNDNESS, componentRoundnessNumericalOptions, componenRoundnessShapeOptions, componentRoundnessOptions, } from './attributes/roundness.js';
|
|
27
|
+
/**
|
|
28
|
+
* size attribute related prop types.
|
|
29
|
+
*/
|
|
30
|
+
export { COMPONENT_SIZE, componentSizeOptions } from './attributes/size.js';
|
|
31
|
+
/**
|
|
32
|
+
* variant attribute related prop types.
|
|
33
|
+
*/
|
|
34
|
+
export { COMPONENT_VARIANT, componentVariantOptions, } from './attributes/variant.js';
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flightlesslabs/dodo-ui",
|
|
3
|
-
"version": "1.0.0--beta-
|
|
3
|
+
"version": "1.0.0--beta-3",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"scss:global": "sass src/lib/styles/global/index.scss dist/styles/global.css",
|
|
6
|
+
"scss:components": "sass src/lib/styles/components.scss dist/styles/components.css",
|
|
7
|
+
"scss": "pnpm scss:global && pnpm scss:components",
|
|
8
|
+
"build": "vite build && pnpm run prepack && pnpm run scss",
|
|
7
9
|
"preview": "vite preview",
|
|
8
10
|
"prepare": "svelte-kit sync || echo ''",
|
|
9
11
|
"prepack": "svelte-kit sync && svelte-package && publint",
|
|
@@ -43,11 +45,11 @@
|
|
|
43
45
|
"exports": {
|
|
44
46
|
".": {
|
|
45
47
|
"types": "./dist/index.d.ts",
|
|
46
|
-
"svelte": "./dist/index.js"
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
"./styles/global.css": "./dist/styles/global.css"
|
|
48
|
+
"svelte": "./dist/index.js"
|
|
49
|
+
}
|
|
50
50
|
},
|
|
51
|
+
"./styles/global.css": "./dist/styles/global.css",
|
|
52
|
+
"./styles/components.css": "./dist/styles/components.css",
|
|
51
53
|
"peerDependencies": {
|
|
52
54
|
"bits-ui": "^2.0.0",
|
|
53
55
|
"svelte": "^5.0.0"
|
|
@@ -70,7 +72,6 @@
|
|
|
70
72
|
"@vitest/coverage-v8": "^4.0.18",
|
|
71
73
|
"@vueless/storybook-dark-mode": "^10.0.7",
|
|
72
74
|
"bits-ui": "^2.15.5",
|
|
73
|
-
"cpy-cli": "^7.0.0",
|
|
74
75
|
"dayjs": "^1.11.19",
|
|
75
76
|
"eslint": "^10.0.0",
|
|
76
77
|
"eslint-config-prettier": "^10.1.8",
|
package/src/lib/Home.mdx
CHANGED
|
@@ -10,7 +10,7 @@ import item from '../../package.json?raw';
|
|
|
10
10
|
<h3 style={{ fontWeight: 500 }}>v{JSON.parse(item)?.version}</h3>
|
|
11
11
|
|
|
12
12
|
<h3 style={{ fontWeight: 400 }}>
|
|
13
|
-
|
|
13
|
+
Opinionated UI framework for Svelte, based on [Bits UI](https://bits-ui.com/)
|
|
14
14
|
</h3>
|
|
15
15
|
|
|
16
16
|
### [Github](https://github.com/flightlesslabs/dodo-ui) - [npm](https://www.npmjs.com/package/@flightlesslabs/dodo-ui)
|
|
@@ -30,7 +30,7 @@ pnpm add bits-ui @flightlesslabs/dodo-ui
|
|
|
30
30
|
`}
|
|
31
31
|
/>
|
|
32
32
|
|
|
33
|
-
We are using bits-ui@{JSON.parse(item).devDependencies['bits-ui']} internally
|
|
33
|
+
We are using **bits-ui@{JSON.parse(item).devDependencies['bits-ui']}** internally
|
|
34
34
|
|
|
35
35
|
## Add css
|
|
36
36
|
|
|
@@ -41,6 +41,7 @@ Add global css in your `+layout.svelte` file
|
|
|
41
41
|
language="js"
|
|
42
42
|
code={`
|
|
43
43
|
import '@flightlesslabs/dodo-ui/styles/global.css';
|
|
44
|
+
import '@flightlesslabs/dodo-ui/styles/components.css';
|
|
44
45
|
`}
|
|
45
46
|
/>
|
|
46
47
|
|
|
@@ -72,7 +72,6 @@
|
|
|
72
72
|
</script>
|
|
73
73
|
|
|
74
74
|
<script lang="ts">
|
|
75
|
-
import './InputEnclosure.scss';
|
|
76
75
|
import type { ComponentSize } from '$lib/attributes/size.js';
|
|
77
76
|
import type { ComponentRoundnessShape } from '$lib/attributes/roundness.js';
|
|
78
77
|
import InputAffix from './InputAffix.svelte';
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
</script>
|
|
78
78
|
|
|
79
79
|
<script lang="ts">
|
|
80
|
-
import './TextInput.scss';
|
|
81
80
|
import type { ComponentSize } from '$lib/attributes/size.js';
|
|
82
81
|
import type { ComponentRoundnessShape } from '$lib/attributes/roundness.js';
|
|
83
82
|
import InputEnclosure from '../InputEnclosure/InputEnclosure.svelte';
|
package/src/lib/index.ts
CHANGED
|
@@ -5,28 +5,71 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Button component and related prop types.
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from './components/Form/index.js';
|
|
8
|
+
export {
|
|
9
|
+
default as Button,
|
|
10
|
+
type ButtonAsButtonProps,
|
|
11
|
+
type ButtonAsAnchorProps,
|
|
12
|
+
type ButtonProps,
|
|
13
|
+
} from './components/Form/Button/Button.svelte';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* TextInput component and related types/events.
|
|
18
17
|
*/
|
|
19
|
-
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} from './components/Form/index.js';
|
|
18
|
+
export {
|
|
19
|
+
default as TextInput,
|
|
20
|
+
type TextInputEvent,
|
|
21
|
+
type TextInputFocusEvent,
|
|
22
|
+
type TextInputProps,
|
|
23
|
+
} from './components/Form/TextInput/TextInput.svelte';
|
|
26
24
|
|
|
27
25
|
/**
|
|
28
26
|
* InputEnclosure component and related prop types.
|
|
29
27
|
*/
|
|
30
|
-
export {
|
|
28
|
+
export {
|
|
29
|
+
default as InputEnclosure,
|
|
30
|
+
type InputEnclosureProps,
|
|
31
|
+
} from './components/Form/InputEnclosure/InputEnclosure.svelte';
|
|
32
|
+
|
|
33
|
+
// =====================================================
|
|
34
|
+
// attributes – Public API
|
|
35
|
+
// =====================================================
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* color attribute related prop types.
|
|
39
|
+
*/
|
|
40
|
+
export {
|
|
41
|
+
COMPONENT_COLOR,
|
|
42
|
+
componentColorOptions,
|
|
43
|
+
componentColorPriorityOptions,
|
|
44
|
+
componentColorSeverityOptions,
|
|
45
|
+
type ComponentColorPriority,
|
|
46
|
+
type ComponentColorSeverity,
|
|
47
|
+
type ComponentColor,
|
|
48
|
+
} from './attributes/color.js';
|
|
31
49
|
|
|
32
|
-
|
|
50
|
+
/**
|
|
51
|
+
* roundness attribute related prop types.
|
|
52
|
+
*/
|
|
53
|
+
export {
|
|
54
|
+
COMPONENT_ROUNDNESS,
|
|
55
|
+
componentRoundnessNumericalOptions,
|
|
56
|
+
componenRoundnessShapeOptions,
|
|
57
|
+
componentRoundnessOptions,
|
|
58
|
+
type ComponentRoundnessNumerical,
|
|
59
|
+
type ComponentRoundnessShape,
|
|
60
|
+
type ComponentRoundness,
|
|
61
|
+
} from './attributes/roundness.js';
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* size attribute related prop types.
|
|
65
|
+
*/
|
|
66
|
+
export { COMPONENT_SIZE, componentSizeOptions, type ComponentSize } from './attributes/size.js';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* variant attribute related prop types.
|
|
70
|
+
*/
|
|
71
|
+
export {
|
|
72
|
+
COMPONENT_VARIANT,
|
|
73
|
+
componentVariantOptions,
|
|
74
|
+
type ComponentVariant,
|
|
75
|
+
} from './attributes/variant.js';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { default as Button, type ButtonAsButtonProps, type ButtonAsAnchorProps, type ButtonProps, } from './Button/Button.svelte';
|
|
2
|
-
export { default as TextInput, type TextInputEvent, type TextInputFocusEvent, type TextInputProps, } from './TextInput/TextInput.svelte';
|
|
3
|
-
export { default as InputEnclosure, type InputEnclosureProps, } from './InputEnclosure/InputEnclosure.svelte';
|
package/dist/styles/global.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@forward 'breakpoints';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
default as Button,
|
|
3
|
-
type ButtonAsButtonProps,
|
|
4
|
-
type ButtonAsAnchorProps,
|
|
5
|
-
type ButtonProps,
|
|
6
|
-
} from './Button/Button.svelte';
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
default as TextInput,
|
|
10
|
-
type TextInputEvent,
|
|
11
|
-
type TextInputFocusEvent,
|
|
12
|
-
type TextInputProps,
|
|
13
|
-
} from './TextInput/TextInput.svelte';
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
default as InputEnclosure,
|
|
17
|
-
type InputEnclosureProps,
|
|
18
|
-
} from './InputEnclosure/InputEnclosure.svelte';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@forward 'breakpoints';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|