@infonomic/uikit 5.3.0 → 5.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/dist/astro.d.ts +51 -0
- package/dist/astro.js +51 -0
- package/dist/components/accordion/accordion.module.css +60 -0
- package/dist/components/avatar/avatar.module.css +54 -0
- package/dist/components/badge/badge.module.css +61 -0
- package/dist/components/button/button-group.module.css +19 -0
- package/dist/components/button/button.astro +86 -0
- package/dist/components/button/button.module.css +431 -0
- package/dist/components/button/control-buttons.module.css +132 -0
- package/dist/components/button/copy-button.module.css +56 -0
- package/dist/components/button/icon-button.astro +47 -0
- package/dist/components/card/card-content.astro +14 -0
- package/dist/components/card/card-description.astro +14 -0
- package/dist/components/card/card-footer.astro +14 -0
- package/dist/components/card/card-header.astro +14 -0
- package/dist/components/card/card-title.astro +14 -0
- package/dist/components/card/card.astro +41 -0
- package/dist/components/card/card.module.css +77 -0
- package/dist/components/container/container.astro +13 -0
- package/dist/components/container/container.module.css +36 -0
- package/dist/components/dropdown/dropdown.module.css +120 -0
- package/dist/components/forms/calendar.module.css +269 -0
- package/dist/components/forms/checkbox.astro +129 -0
- package/dist/components/forms/checkbox.js +1 -1
- package/dist/components/forms/checkbox.module.css +211 -0
- package/dist/components/forms/error-text.astro +14 -0
- package/dist/components/forms/error-text.module.css +9 -0
- package/dist/components/forms/help-text.astro +13 -0
- package/dist/components/forms/help-text.module.css +9 -0
- package/dist/components/forms/input-adornment.astro +26 -0
- package/dist/components/forms/input-adornment.module.css +21 -0
- package/dist/components/forms/input.astro +99 -0
- package/dist/components/forms/input.module.css +278 -0
- package/dist/components/forms/label.astro +24 -0
- package/dist/components/forms/label.module.css +15 -0
- package/dist/components/forms/radio-group.module.css +163 -0
- package/dist/components/forms/select.module.css +68 -0
- package/dist/components/forms/text-area.astro +77 -0
- package/dist/components/forms/text-area.module.css +10 -0
- package/dist/components/hamburger/hamburger.astro +30 -0
- package/dist/components/notifications/alert.module.css +110 -0
- package/dist/components/notifications/toast.module.css +237 -0
- package/dist/components/overlay/overlay.module.css +41 -0
- package/dist/components/pager/pagination.module.css +149 -0
- package/dist/components/scroll-area/scroll-area.module.css +64 -0
- package/dist/components/scroll-to-top/scroll-to-top.astro +75 -0
- package/dist/components/scroll-to-top/scroll-to-top.module.css +86 -0
- package/dist/components/section/section.astro +13 -0
- package/dist/components/section/section.module.css +9 -0
- package/dist/components/shimmer/shimmer.module.css +53 -0
- package/dist/components/table/table.module.css +100 -0
- package/dist/components/tabs/tabs.module.css +66 -0
- package/dist/components/tooltip/tooltip.module.css +45 -0
- package/dist/icons/check-icon.astro +37 -0
- package/dist/icons/close-icon.astro +38 -0
- package/dist/icons/icon-element.astro +27 -0
- package/dist/icons/icons.module.css +155 -0
- package/dist/icons/light-icon.astro +36 -0
- package/dist/icons/moon-icon.astro +38 -0
- package/dist/icons/search-icon.astro +40 -0
- package/dist/widgets/datepicker/datepicker.module.css +189 -0
- package/dist/widgets/drawer/drawer.module.css +112 -0
- package/dist/widgets/modal/modal.module.css +81 -0
- package/dist/widgets/timeline/timeline.module.css +87 -0
- package/package.json +5 -4
- package/src/astro.js +6 -0
- package/src/components/forms/checkbox.astro +129 -0
- package/src/components/forms/checkbox.tsx +1 -1
- package/src/components/forms/text-area.astro +77 -0
- package/src/icons/check-icon.astro +37 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
import type { Intent, Variant } from './@types/input.js'
|
|
4
|
+
import ErrorText from './error-text.astro'
|
|
5
|
+
import HelpText from './help-text.astro'
|
|
6
|
+
import inputStyles from './input.module.css'
|
|
7
|
+
import Label from './label.astro'
|
|
8
|
+
import styles from './text-area.module.css'
|
|
9
|
+
|
|
10
|
+
interface Props extends HTMLAttributes<'textarea'> {
|
|
11
|
+
id: string
|
|
12
|
+
name: string
|
|
13
|
+
label: string
|
|
14
|
+
required?: boolean
|
|
15
|
+
variant?: Variant
|
|
16
|
+
intent?: Intent
|
|
17
|
+
rows?: number
|
|
18
|
+
placeHolder?: string
|
|
19
|
+
autoComplete?: string
|
|
20
|
+
error?: boolean
|
|
21
|
+
helpText?: string
|
|
22
|
+
errorText?: string
|
|
23
|
+
class?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const {
|
|
27
|
+
id,
|
|
28
|
+
name,
|
|
29
|
+
label,
|
|
30
|
+
rows = 4,
|
|
31
|
+
required = false,
|
|
32
|
+
variant = 'outlined',
|
|
33
|
+
intent = 'primary',
|
|
34
|
+
placeHolder = '',
|
|
35
|
+
autoComplete = 'off',
|
|
36
|
+
error = false,
|
|
37
|
+
helpText = '',
|
|
38
|
+
errorText = '',
|
|
39
|
+
class: className,
|
|
40
|
+
...rest
|
|
41
|
+
} = Astro.props as Props
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
<fieldset class:list={['text-area-wrapper', inputStyles['input-wrapper']]}>
|
|
45
|
+
<Label id={id} for={id} required={required} label={label} />
|
|
46
|
+
<textarea
|
|
47
|
+
id={id}
|
|
48
|
+
name={name}
|
|
49
|
+
required={required}
|
|
50
|
+
rows={rows}
|
|
51
|
+
auto-complete={autoComplete}
|
|
52
|
+
placeholder={placeHolder}
|
|
53
|
+
aria-labelledby={`label-for-${id}`}
|
|
54
|
+
aria-invalid={error}
|
|
55
|
+
aria-required={required}
|
|
56
|
+
aria-errormessage={errorText}
|
|
57
|
+
aria-describedby={error ? `error-for-${id}` : undefined}
|
|
58
|
+
class:list={[
|
|
59
|
+
'text-area',
|
|
60
|
+
variant,
|
|
61
|
+
intent,
|
|
62
|
+
inputStyles.input,
|
|
63
|
+
inputStyles[variant],
|
|
64
|
+
inputStyles[intent],
|
|
65
|
+
styles['text-area'],
|
|
66
|
+
error && inputStyles.error,
|
|
67
|
+
className
|
|
68
|
+
]}
|
|
69
|
+
{...rest}></textarea>
|
|
70
|
+
{
|
|
71
|
+
error ? (
|
|
72
|
+
<ErrorText id={`error-for-${id}`} text={errorText ?? helpText} />
|
|
73
|
+
) : (
|
|
74
|
+
helpText?.length > 0 && <HelpText text={helpText} />
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
</fieldset>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
|
|
4
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
5
|
+
class?: string
|
|
6
|
+
width?: string
|
|
7
|
+
height?: string
|
|
8
|
+
menuItem?: boolean
|
|
9
|
+
svgClass?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
import IconElement from './icon-element.astro'
|
|
13
|
+
import styles from './icons.module.css'
|
|
14
|
+
|
|
15
|
+
const { class: className, width, height, svgClass: svgClassName, menuItem, ...rest } = Astro.props
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<IconElement
|
|
19
|
+
class:list={['check-icon', className]}
|
|
20
|
+
width={width}
|
|
21
|
+
height={height}
|
|
22
|
+
menuItem={menuItem}
|
|
23
|
+
{...rest}
|
|
24
|
+
>
|
|
25
|
+
<svg
|
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
+
viewBox="0 0 15 15"
|
|
28
|
+
class:list={[styles['fill-current'], svgClassName]}
|
|
29
|
+
focusable="false"
|
|
30
|
+
aria-hidden="true"
|
|
31
|
+
>
|
|
32
|
+
<path
|
|
33
|
+
d="M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z"
|
|
34
|
+
fill-rule="evenodd"
|
|
35
|
+
clip-rule="evenodd"></path>
|
|
36
|
+
</svg>
|
|
37
|
+
</IconElement>
|