@stacksjs/components 0.2.572 → 0.2.573
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/components/CodeBlock.d.ts +35 -0
- package/dist/components/Footer.d.ts +12 -0
- package/dist/components/Hero.d.ts +7 -0
- package/dist/components/Installation.d.ts +9 -0
- package/dist/components/index.d.ts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/ui/accordion/Accordion.d.ts +22 -0
- package/dist/ui/accordion/AccordionItem.d.ts +11 -0
- package/dist/ui/accordion/index.d.ts +2 -2
- package/dist/ui/audio/Audio.d.ts +4 -0
- package/dist/ui/audio/index.d.ts +1 -1
- package/dist/ui/auth/Login.d.ts +30 -0
- package/dist/ui/auth/Signup.d.ts +18 -0
- package/dist/ui/auth/TwoFactorChallenge.d.ts +24 -0
- package/dist/ui/auth/index.d.ts +3 -3
- package/dist/ui/avatar/Avatar.d.ts +17 -0
- package/dist/ui/avatar/index.d.ts +1 -1
- package/dist/ui/badge/Badge.d.ts +42 -0
- package/dist/ui/badge/index.d.ts +1 -1
- package/dist/ui/breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/ui/breadcrumb/index.d.ts +1 -1
- package/dist/ui/button/Button.d.ts +103 -0
- package/dist/ui/button/index.d.ts +1 -1
- package/dist/ui/calendar/Calendar.d.ts +67 -0
- package/dist/ui/calendar/index.d.ts +1 -1
- package/dist/ui/card/Card.d.ts +14 -0
- package/dist/ui/card/index.d.ts +1 -1
- package/dist/ui/chat/ChatInbox.d.ts +15 -0
- package/dist/ui/chat/ChatLauncher.d.ts +8 -0
- package/dist/ui/chat/ChatMessage.d.ts +9 -0
- package/dist/ui/chat/ChatUnreadBadge.d.ts +5 -0
- package/dist/ui/chat/index.d.ts +4 -4
- package/dist/ui/checkbox/Checkbox.d.ts +53 -0
- package/dist/ui/checkbox/index.d.ts +1 -1
- package/dist/ui/combobox/Combobox.d.ts +40 -0
- package/dist/ui/combobox/ComboboxButton.d.ts +13 -0
- package/dist/ui/combobox/ComboboxInput.d.ts +9 -0
- package/dist/ui/combobox/ComboboxOption.d.ts +10 -0
- package/dist/ui/combobox/ComboboxOptions.d.ts +7 -0
- package/dist/ui/combobox/index.d.ts +5 -5
- package/dist/ui/command-palette/CommandPalette.d.ts +13 -0
- package/dist/ui/command-palette/CommandPaletteItem.d.ts +8 -0
- package/dist/ui/command-palette/index.d.ts +2 -2
- package/dist/ui/date-range-picker/DateRangePicker.d.ts +59 -0
- package/dist/ui/date-range-picker/index.d.ts +1 -1
- package/dist/ui/dialog/Dialog.d.ts +31 -0
- package/dist/ui/dialog/DialogBackdrop.d.ts +6 -0
- package/dist/ui/dialog/DialogDescription.d.ts +6 -0
- package/dist/ui/dialog/DialogPanel.d.ts +6 -0
- package/dist/ui/dialog/DialogTitle.d.ts +6 -0
- package/dist/ui/dialog/index.d.ts +5 -5
- package/dist/ui/drawer/Drawer.d.ts +90 -0
- package/dist/ui/drawer/index.d.ts +1 -1
- package/dist/ui/dropdown/Dropdown.d.ts +12 -0
- package/dist/ui/dropdown/DropdownButton.d.ts +8 -0
- package/dist/ui/dropdown/DropdownItem.d.ts +10 -0
- package/dist/ui/dropdown/DropdownItems.d.ts +7 -0
- package/dist/ui/dropdown/index.d.ts +4 -4
- package/dist/ui/empty-state/EmptyState.d.ts +33 -0
- package/dist/ui/empty-state/index.d.ts +1 -1
- package/dist/ui/form/Form.d.ts +31 -0
- package/dist/ui/form/index.d.ts +1 -1
- package/dist/ui/image/Image.d.ts +104 -0
- package/dist/ui/image/index.d.ts +1 -1
- package/dist/ui/input/EmailInput.d.ts +28 -0
- package/dist/ui/input/NumberInput.d.ts +83 -0
- package/dist/ui/input/PasswordInput.d.ts +84 -0
- package/dist/ui/input/SearchInput.d.ts +29 -0
- package/dist/ui/input/TextInput.d.ts +145 -0
- package/dist/ui/input/index.d.ts +17 -5
- package/dist/ui/listbox/Listbox.d.ts +30 -0
- package/dist/ui/listbox/ListboxButton.d.ts +8 -0
- package/dist/ui/listbox/ListboxLabel.d.ts +6 -0
- package/dist/ui/listbox/ListboxOption.d.ts +10 -0
- package/dist/ui/listbox/ListboxOptions.d.ts +7 -0
- package/dist/ui/listbox/index.d.ts +5 -5
- package/dist/ui/mobile/FilterChip.d.ts +35 -0
- package/dist/ui/mobile/FilterChips.d.ts +26 -0
- package/dist/ui/mobile/ListRow.d.ts +35 -0
- package/dist/ui/mobile/NavBar.d.ts +47 -0
- package/dist/ui/mobile/SectionCard.d.ts +38 -0
- package/dist/ui/mobile/TabBar.d.ts +31 -0
- package/dist/ui/mobile/TabBarItem.d.ts +41 -0
- package/dist/ui/mobile/index.d.ts +7 -7
- package/dist/ui/navigator/Navigator.d.ts +14 -0
- package/dist/ui/navigator/index.d.ts +1 -1
- package/dist/ui/notification/Notification.d.ts +22 -0
- package/dist/ui/notification/index.d.ts +1 -1
- package/dist/ui/pager/Pager.d.ts +48 -0
- package/dist/ui/pager/PagerDots.d.ts +22 -0
- package/dist/ui/pager/index.d.ts +2 -2
- package/dist/ui/pagination/Pagination.d.ts +19 -0
- package/dist/ui/pagination/index.d.ts +1 -1
- package/dist/ui/payment/Checkout.d.ts +13 -0
- package/dist/ui/payment/DefaultPaymentMethod.d.ts +8 -0
- package/dist/ui/payment/PaymentMethods.d.ts +23 -0
- package/dist/ui/payment/SubscriptionCheckout.d.ts +28 -0
- package/dist/ui/payment/index.d.ts +4 -4
- package/dist/ui/popover/Popover.d.ts +12 -0
- package/dist/ui/popover/PopoverButton.d.ts +8 -0
- package/dist/ui/popover/PopoverPanel.d.ts +8 -0
- package/dist/ui/popover/index.d.ts +3 -3
- package/dist/ui/portal/Portal.d.ts +7 -0
- package/dist/ui/portal/index.d.ts +1 -1
- package/dist/ui/progress/Progress.d.ts +32 -0
- package/dist/ui/progress/index.d.ts +1 -1
- package/dist/ui/radio/Radio.d.ts +51 -0
- package/dist/ui/radio/index.d.ts +1 -1
- package/dist/ui/radio-group/RadioGroup.d.ts +47 -0
- package/dist/ui/radio-group/RadioGroupDescription.d.ts +6 -0
- package/dist/ui/radio-group/RadioGroupLabel.d.ts +6 -0
- package/dist/ui/radio-group/RadioGroupOption.d.ts +10 -0
- package/dist/ui/radio-group/index.d.ts +4 -4
- package/dist/ui/select/Select.d.ts +93 -0
- package/dist/ui/select/index.d.ts +1 -1
- package/dist/ui/sidebar/Sidebar.d.ts +70 -0
- package/dist/ui/sidebar/SidebarFooter.d.ts +21 -0
- package/dist/ui/sidebar/SidebarHeader.d.ts +114 -0
- package/dist/ui/sidebar/SidebarItem.d.ts +37 -0
- package/dist/ui/sidebar/SidebarPinned.d.ts +27 -0
- package/dist/ui/sidebar/SidebarSection.d.ts +35 -0
- package/dist/ui/sidebar/SidebarSpace.d.ts +44 -0
- package/dist/ui/sidebar/SidebarSpaceSwitcher.d.ts +30 -0
- package/dist/ui/sidebar/SidebarSpaces.d.ts +38 -0
- package/dist/ui/sidebar/index.d.ts +9 -9
- package/dist/ui/sidebar/themes.d.ts +39 -5
- package/dist/ui/skeleton/Skeleton.d.ts +13 -0
- package/dist/ui/skeleton/index.d.ts +1 -1
- package/dist/ui/spinner/Spinner.d.ts +13 -0
- package/dist/ui/spinner/index.d.ts +1 -1
- package/dist/ui/stepper/Stepper.d.ts +8 -0
- package/dist/ui/stepper/StepperStep.d.ts +17 -0
- package/dist/ui/stepper/index.d.ts +2 -2
- package/dist/ui/switch/Switch.d.ts +75 -0
- package/dist/ui/switch/index.d.ts +1 -1
- package/dist/ui/table/Table.d.ts +20 -0
- package/dist/ui/table/TableBody.d.ts +5 -0
- package/dist/ui/table/TableCell.d.ts +5 -0
- package/dist/ui/table/TableHead.d.ts +5 -0
- package/dist/ui/table/TableHeader.d.ts +45 -0
- package/dist/ui/table/TableRow.d.ts +6 -0
- package/dist/ui/table/index.d.ts +6 -6
- package/dist/ui/tabs/Tab.d.ts +19 -0
- package/dist/ui/tabs/TabList.d.ts +34 -0
- package/dist/ui/tabs/TabPanel.d.ts +13 -0
- package/dist/ui/tabs/Tabs.d.ts +30 -0
- package/dist/ui/tabs/index.d.ts +4 -4
- package/dist/ui/teleport/Teleport.d.ts +8 -0
- package/dist/ui/teleport/index.d.ts +1 -1
- package/dist/ui/textarea/Textarea.d.ts +75 -0
- package/dist/ui/textarea/index.d.ts +1 -1
- package/dist/ui/theme-toggle/ThemeToggle.d.ts +53 -0
- package/dist/ui/theme-toggle/index.d.ts +1 -1
- package/dist/ui/tooltip/Tooltip.d.ts +39 -0
- package/dist/ui/tooltip/index.d.ts +1 -1
- package/dist/ui/transition/Transition.d.ts +191 -0
- package/dist/ui/transition/index.d.ts +1 -1
- package/dist/ui/video/Video.d.ts +61 -0
- package/dist/ui/video/index.d.ts +1 -1
- package/dist/ui/virtual-list/VirtualList.d.ts +12 -0
- package/dist/ui/virtual-list/index.d.ts +1 -1
- package/dist/ui/virtual-table/VirtualTable.d.ts +21 -0
- package/dist/ui/virtual-table/index.d.ts +1 -1
- package/dist/utils/accessibility.d.ts +15 -0
- package/dist/utils/error-handling.d.ts +15 -2
- package/dist/utils/i18n.d.ts +48 -65
- package/dist/utils/keep-alive.d.ts +27 -3
- package/dist/utils/lazy-loading.d.ts +5 -1
- package/dist/utils/prop-validation.d.ts +3 -3
- package/dist/utils/tooltip-position.d.ts +7 -1
- package/package.json +4 -7
- package/src/utils/animation/helpers.ts +5 -5
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const webpSrc: unknown;
|
|
4
|
+
export declare const webpSrcSet: unknown;
|
|
5
|
+
/**
|
|
6
|
+
* The optimized variants stx prepared for this image, unless the caller wrote
|
|
7
|
+
* sources of their own.
|
|
8
|
+
*
|
|
9
|
+
* A dev server or build that serves the public directory encodes every local
|
|
10
|
+
* raster into AVIF and WebP at several widths. stx's builtin `<StxImage>` reads
|
|
11
|
+
* that catalog itself; this component used to ignore it. Since stx registers
|
|
12
|
+
* this package on its own whenever it is installed, this `<Image>` is the one
|
|
13
|
+
* a bare `<Image>` tag resolves to, and every image in the app went out as the
|
|
14
|
+
* original full-size file.
|
|
15
|
+
*/
|
|
16
|
+
declare const explicitSources: unknown;
|
|
17
|
+
declare const explicitSrcSet: unknown;
|
|
18
|
+
declare const delivered: unknown;
|
|
19
|
+
export declare const src: unknown;
|
|
20
|
+
export declare const srcSet: unknown;
|
|
21
|
+
// Width descriptors mean nothing without `sizes`; 100vw is what a browser
|
|
22
|
+
// assumes anyway, said out loud.
|
|
23
|
+
export declare const sizes: unknown;
|
|
24
|
+
export declare const sources: unknown;
|
|
25
|
+
export declare const decorative: ReturnType<typeof $bool>;
|
|
26
|
+
export declare const alt: unknown;
|
|
27
|
+
export declare const width: unknown;
|
|
28
|
+
export declare const height: unknown;
|
|
29
|
+
export declare const priority: ReturnType<typeof $bool>;
|
|
30
|
+
export declare const lazy: unknown;
|
|
31
|
+
export declare const loading: unknown;
|
|
32
|
+
export declare const decoding: unknown;
|
|
33
|
+
export declare const fetchpriority: unknown;
|
|
34
|
+
/**
|
|
35
|
+
* A CSS value painted behind the image while it arrives - a colour, a
|
|
36
|
+
* gradient, or `url("data:image/...")` for a low-quality preview. Anything
|
|
37
|
+
* `background` accepts.
|
|
38
|
+
*
|
|
39
|
+
* Behind, not on the image itself: a background set on an `<img>` shows
|
|
40
|
+
* through anything transparent in it and stays there once it has loaded,
|
|
41
|
+
* which is a permanent artefact on every PNG with an alpha channel.
|
|
42
|
+
*/
|
|
43
|
+
declare const placeholderMode: unknown;
|
|
44
|
+
declare const imagePlaceholder: unknown;
|
|
45
|
+
declare const placeholderColor: unknown;
|
|
46
|
+
export declare const placeholder: boolean;
|
|
47
|
+
export declare const aspectRatio: unknown;
|
|
48
|
+
export declare const objectFit: unknown;
|
|
49
|
+
export declare const objectPosition: unknown;
|
|
50
|
+
export declare const rounded: ReturnType<typeof $bool>;
|
|
51
|
+
export declare const zoomOnHover: ReturnType<typeof $bool>;
|
|
52
|
+
export declare const className: unknown;
|
|
53
|
+
export declare const hasWebP: unknown;
|
|
54
|
+
/**
|
|
55
|
+
* @defaultValue
|
|
56
|
+
* ```ts
|
|
57
|
+
* {
|
|
58
|
+
* true: '0.5rem',
|
|
59
|
+
* full: '9999px',
|
|
60
|
+
* sm: '0.125rem',
|
|
61
|
+
* md: '0.375rem',
|
|
62
|
+
* lg: '0.5rem',
|
|
63
|
+
* xl: '0.75rem',
|
|
64
|
+
* '2xl': '1rem'
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
declare const RADII: {
|
|
69
|
+
/** @defaultValue '0.5rem' */
|
|
70
|
+
true: string;
|
|
71
|
+
/** @defaultValue '9999px' */
|
|
72
|
+
full: string;
|
|
73
|
+
/** @defaultValue '0.125rem' */
|
|
74
|
+
sm: string;
|
|
75
|
+
/** @defaultValue '0.375rem' */
|
|
76
|
+
md: string;
|
|
77
|
+
/** @defaultValue '0.5rem' */
|
|
78
|
+
lg: string;
|
|
79
|
+
/** @defaultValue '0.75rem' */
|
|
80
|
+
xl: string;
|
|
81
|
+
/** @defaultValue '1rem' */
|
|
82
|
+
'2xl': string
|
|
83
|
+
};
|
|
84
|
+
declare const radius: unknown;
|
|
85
|
+
/**
|
|
86
|
+
* Styles inline rather than as utility classes.
|
|
87
|
+
*
|
|
88
|
+
* This component ships in a library and renders inside applications that do
|
|
89
|
+
* not necessarily use a utility CSS framework - and even where one is present,
|
|
90
|
+
* its scanner has to be pointed at `node_modules` to see class names written
|
|
91
|
+
* here, which is not the default anywhere. It previously emitted `relative`,
|
|
92
|
+
* `block`, `overflow-hidden`, `h-full`, `w-full` and `bg-stone-100`, and in an
|
|
93
|
+
* app whose scanner never saw this file not one of those rules existed: every
|
|
94
|
+
* image rendered at its intrinsic size inside an unstyled wrapper.
|
|
95
|
+
*
|
|
96
|
+
* Width and height at 100% make the wrapper transparent to layout. Against a
|
|
97
|
+
* parent with a definite height it passes that height down; against one
|
|
98
|
+
* without, it resolves to `auto` and the image's own ratio decides. Both
|
|
99
|
+
* matter, because a stylesheet may size either the box or the image.
|
|
100
|
+
*/
|
|
101
|
+
export declare const frameStyle: unknown;
|
|
102
|
+
export declare const imageStyle: unknown;
|
|
103
|
+
declare type __DtsxStxComponentType = DefineComponent<{ webpSrc?: string, webpSrcSet?: string, sources?: unknown, srcSet?: unknown, srcset?: string, src?: string, sizes?: unknown, decorative?: unknown, alt?: unknown, width?: unknown, height?: unknown, priority?: unknown, lazy?: unknown, loading?: unknown, decoding?: string, fetchpriority?: string, placeholder?: unknown, placeholderColor?: unknown, aspectRatio?: unknown, objectFit?: unknown, fit?: string, objectPosition?: unknown, position?: string, rounded?: unknown, zoomOnHover?: unknown, className?: unknown, class?: string }>;
|
|
104
|
+
export default __dtsx_component__;
|
package/dist/ui/image/index.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const value: unknown;
|
|
4
|
+
export declare const placeholder: unknown;
|
|
5
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const readonly: ReturnType<typeof $bool>;
|
|
7
|
+
export declare const size: unknown;
|
|
8
|
+
export declare const error: ReturnType<typeof $bool>;
|
|
9
|
+
export declare const label: unknown;
|
|
10
|
+
export declare const helperText: unknown;
|
|
11
|
+
export declare const required: ReturnType<typeof $bool>;
|
|
12
|
+
export declare const className: unknown;
|
|
13
|
+
export declare const emailIcon: '<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /></svg>';
|
|
14
|
+
/*
|
|
15
|
+
* Forwarded to the TextInput this renders (stacksjs/stx#2043).
|
|
16
|
+
*
|
|
17
|
+
* A wrapper that does not pass them through is as unsubmittable as a control
|
|
18
|
+
* that never accepted them: the inner input is the one that lands in FormData.
|
|
19
|
+
* `type` is the wrapper's own business, but `name`, `autocomplete` and `form`
|
|
20
|
+
* belong to the caller.
|
|
21
|
+
*/
|
|
22
|
+
export declare const name: unknown;
|
|
23
|
+
export declare const autocomplete: unknown;
|
|
24
|
+
export declare const form: unknown;
|
|
25
|
+
export declare const inputMode: unknown;
|
|
26
|
+
export declare const enterKeyHint: unknown;
|
|
27
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: string, placeholder?: string, disabled?: unknown, readonly?: unknown, size?: string, error?: unknown, label?: string, helperText?: string, required?: unknown, className?: string, name?: string, autocomplete?: unknown, autoComplete?: string, form?: string, inputMode?: unknown, inputmode?: string, enterKeyHint?: unknown, enterkeyhint?: string }>;
|
|
28
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function increment(): undefined;
|
|
3
|
+
declare function decrement(): undefined;
|
|
4
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
5
|
+
export declare const value: unknown;
|
|
6
|
+
export declare const placeholder: unknown;
|
|
7
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
8
|
+
export declare const readonly: ReturnType<typeof $bool>;
|
|
9
|
+
export declare const size: unknown;
|
|
10
|
+
export declare const error: ReturnType<typeof $bool>;
|
|
11
|
+
export declare const label: unknown;
|
|
12
|
+
/*
|
|
13
|
+
* Ids unique to this instance.
|
|
14
|
+
*
|
|
15
|
+
* These were derived from the LABEL or hardcoded outright, so two of these on
|
|
16
|
+
* one page -- an ordinary form -- emitted the same id twice. `<label for>`
|
|
17
|
+
* then activated the FIRST field from every label, and `aria-describedby`
|
|
18
|
+
* pointed every field's description at the first one's helper text. A label
|
|
19
|
+
* containing a space also produced an invalid id, `input-First name`, which
|
|
20
|
+
* getElementById and querySelector cannot address at all.
|
|
21
|
+
*
|
|
22
|
+
* `$uid` is unique per instance and stable across renders, which is what an id
|
|
23
|
+
* has to be (utils.ts explains why a render that changes its own bytes is
|
|
24
|
+
* uncacheable). The `id` prop overrides it, for a caller that needs to point
|
|
25
|
+
* its own `for` or `aria-describedby` at this control.
|
|
26
|
+
*/
|
|
27
|
+
export declare const inputId: unknown;
|
|
28
|
+
export declare const helperId: string;
|
|
29
|
+
export declare const helperText: unknown;
|
|
30
|
+
export declare const required: ReturnType<typeof $bool>;
|
|
31
|
+
/*
|
|
32
|
+
* Numbers, not the strings an attribute arrives as: `step="2"` reached the
|
|
33
|
+
* client script as "2", and the Increment button computed 10 + "2" = "102".
|
|
34
|
+
*/
|
|
35
|
+
export declare const min: boolean;
|
|
36
|
+
export declare const max: boolean;
|
|
37
|
+
export declare const step: unknown;
|
|
38
|
+
export declare const showControls: unknown;
|
|
39
|
+
export declare const className: unknown;
|
|
40
|
+
export declare const inputClassName: unknown;
|
|
41
|
+
/*
|
|
42
|
+
* Padding decides the height here too, with no `h-*` to override it: an app
|
|
43
|
+
* passing its own `py-1.5` got the padding it asked for and the height it did
|
|
44
|
+
* not, and `className` cannot beat `h-10` at equal specificity
|
|
45
|
+
* (stacksjs/stx#1993).
|
|
46
|
+
*
|
|
47
|
+
* `lg` also needed a padding step adjusted - py-3 around a 1.75rem line-height
|
|
48
|
+
* is 3.25rem of content inside a declared 3rem box - so py-2.5 lands on the
|
|
49
|
+
* 3rem it always claimed. sm and md were already exact.
|
|
50
|
+
*/
|
|
51
|
+
/*
|
|
52
|
+
* md -- the size nearly every form uses -- reads the density roles, so an
|
|
53
|
+
* app sets its own field size with --stx-control-px, --stx-control-py,
|
|
54
|
+
* --stx-control-text and --stx-control-leading instead of a className
|
|
55
|
+
* that ties with py-2 on specificity. The fallbacks are px-4 / py-2 /
|
|
56
|
+
* text-base, so nothing moves by default (stacksjs/stx#1993).
|
|
57
|
+
*/
|
|
58
|
+
export declare const inputClasses: unknown;
|
|
59
|
+
export declare const labelClasses: unknown;
|
|
60
|
+
export declare const helperClasses: unknown;
|
|
61
|
+
/*
|
|
62
|
+
* The attributes that make this a form control (stacksjs/stx#2043).
|
|
63
|
+
*
|
|
64
|
+
* A control with no `name` is not a form control in the HTML sense: it is left
|
|
65
|
+
* out of FormData, out of form.elements.namedItem(), and out of an ordinary
|
|
66
|
+
* non-JS POST. A form built from these components submitted nothing for every
|
|
67
|
+
* field, silently -- which is how six apps read their forms.
|
|
68
|
+
*
|
|
69
|
+
* `autocomplete` is separate and just as load-bearing: it is how the browser
|
|
70
|
+
* and a password manager identify a field, so a password input without
|
|
71
|
+
* `autocomplete="current-password"` is never offered for autofill and is not
|
|
72
|
+
* recognised as part of a sign-in form at all.
|
|
73
|
+
*
|
|
74
|
+
* Emitted only when given, so a control that passes none of them renders
|
|
75
|
+
* exactly the markup it did before.
|
|
76
|
+
*/
|
|
77
|
+
export declare const name: unknown;
|
|
78
|
+
export declare const autocomplete: unknown;
|
|
79
|
+
export declare const form: unknown;
|
|
80
|
+
export declare const inputMode: unknown;
|
|
81
|
+
export declare const enterKeyHint: unknown;
|
|
82
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: string, placeholder?: string, disabled?: unknown, readonly?: unknown, size?: string, error?: unknown, label?: string, id?: string, helperText?: string, required?: unknown, min?: unknown, max?: unknown, step?: unknown, showControls?: unknown, className?: string, inputClassName?: string, name?: string, autocomplete?: unknown, autoComplete?: string, form?: string, inputMode?: unknown, inputmode?: string, enterKeyHint?: unknown, enterkeyhint?: string }> & { readonly __stxExposed?: { value: unknown, increment: typeof increment, decrement: typeof decrement } }
|
|
83
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const value: unknown;
|
|
4
|
+
export declare const placeholder: unknown;
|
|
5
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const readonly: ReturnType<typeof $bool>;
|
|
7
|
+
export declare const size: unknown;
|
|
8
|
+
export declare const error: ReturnType<typeof $bool>;
|
|
9
|
+
export declare const label: unknown;
|
|
10
|
+
/*
|
|
11
|
+
* Ids unique to this instance.
|
|
12
|
+
*
|
|
13
|
+
* These were derived from the LABEL or hardcoded outright, so two of these on
|
|
14
|
+
* one page -- an ordinary form -- emitted the same id twice. `<label for>`
|
|
15
|
+
* then activated the FIRST field from every label, and `aria-describedby`
|
|
16
|
+
* pointed every field's description at the first one's helper text. A label
|
|
17
|
+
* containing a space also produced an invalid id, `input-First name`, which
|
|
18
|
+
* getElementById and querySelector cannot address at all.
|
|
19
|
+
*
|
|
20
|
+
* `$uid` is unique per instance and stable across renders, which is what an id
|
|
21
|
+
* has to be (utils.ts explains why a render that changes its own bytes is
|
|
22
|
+
* uncacheable). The `id` prop overrides it, for a caller that needs to point
|
|
23
|
+
* its own `for` or `aria-describedby` at this control.
|
|
24
|
+
*/
|
|
25
|
+
export declare const inputId: unknown;
|
|
26
|
+
export declare const helperId: string;
|
|
27
|
+
export declare const helperText: unknown;
|
|
28
|
+
export declare const required: ReturnType<typeof $bool>;
|
|
29
|
+
export declare const showStrength: ReturnType<typeof $bool>;
|
|
30
|
+
export declare const className: unknown;
|
|
31
|
+
export declare const inputClassName: unknown;
|
|
32
|
+
/*
|
|
33
|
+
* Padding decides the height here too, with no `h-*` to override it: an app
|
|
34
|
+
* passing its own `py-1.5` got the padding it asked for and the height it did
|
|
35
|
+
* not, and `className` cannot beat `h-10` at equal specificity
|
|
36
|
+
* (stacksjs/stx#1993).
|
|
37
|
+
*
|
|
38
|
+
* `lg` also needed a padding step adjusted - py-3 around a 1.75rem line-height
|
|
39
|
+
* is 3.25rem of content inside a declared 3rem box - so py-2.5 lands on the
|
|
40
|
+
* 3rem it always claimed. sm and md were already exact.
|
|
41
|
+
*/
|
|
42
|
+
/*
|
|
43
|
+
* md -- the size nearly every form uses -- reads the density roles, so an
|
|
44
|
+
* app sets its own field size with --stx-control-px, --stx-control-py,
|
|
45
|
+
* --stx-control-text and --stx-control-leading instead of a className
|
|
46
|
+
* that ties with py-2 on specificity. The fallbacks are px-4 / py-2 /
|
|
47
|
+
* text-base, so nothing moves by default (stacksjs/stx#1993).
|
|
48
|
+
* @defaultValue `{ sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-6 w-6' }`
|
|
49
|
+
*/
|
|
50
|
+
declare const iconSizeClasses: {
|
|
51
|
+
/** @defaultValue 'h-4 w-4' */
|
|
52
|
+
sm: string;
|
|
53
|
+
/** @defaultValue 'h-5 w-5' */
|
|
54
|
+
md: string;
|
|
55
|
+
/** @defaultValue 'h-6 w-6' */
|
|
56
|
+
lg: string
|
|
57
|
+
};
|
|
58
|
+
export declare const inputClasses: unknown;
|
|
59
|
+
export declare const labelClasses: unknown;
|
|
60
|
+
export declare const helperClasses: unknown;
|
|
61
|
+
export declare const iconClasses: unknown;
|
|
62
|
+
/*
|
|
63
|
+
* The attributes that make this a form control (stacksjs/stx#2043).
|
|
64
|
+
*
|
|
65
|
+
* A control with no `name` is not a form control in the HTML sense: it is left
|
|
66
|
+
* out of FormData, out of form.elements.namedItem(), and out of an ordinary
|
|
67
|
+
* non-JS POST. A form built from these components submitted nothing for every
|
|
68
|
+
* field, silently -- which is how six apps read their forms.
|
|
69
|
+
*
|
|
70
|
+
* `autocomplete` is separate and just as load-bearing: it is how the browser
|
|
71
|
+
* and a password manager identify a field, so a password input without
|
|
72
|
+
* `autocomplete="current-password"` is never offered for autofill and is not
|
|
73
|
+
* recognised as part of a sign-in form at all.
|
|
74
|
+
*
|
|
75
|
+
* Emitted only when given, so a control that passes none of them renders
|
|
76
|
+
* exactly the markup it did before.
|
|
77
|
+
*/
|
|
78
|
+
export declare const name: unknown;
|
|
79
|
+
export declare const autocomplete: unknown;
|
|
80
|
+
export declare const form: unknown;
|
|
81
|
+
export declare const inputMode: unknown;
|
|
82
|
+
export declare const enterKeyHint: unknown;
|
|
83
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: string, placeholder?: string, disabled?: unknown, readonly?: unknown, size?: string, error?: unknown, label?: string, id?: string, helperText?: string, required?: unknown, showStrength?: unknown, className?: string, inputClassName?: string, name?: string, autocomplete?: unknown, autoComplete?: string, form?: string, inputMode?: unknown, inputmode?: string, enterKeyHint?: unknown, enterkeyhint?: string }> & { readonly __stxExposed?: { value: unknown } }
|
|
84
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const value: unknown;
|
|
4
|
+
export declare const placeholder: unknown;
|
|
5
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const size: unknown;
|
|
7
|
+
export declare const error: ReturnType<typeof $bool>;
|
|
8
|
+
export declare const label: unknown;
|
|
9
|
+
export declare const helperText: unknown;
|
|
10
|
+
export declare const loading: ReturnType<typeof $bool>;
|
|
11
|
+
export declare const className: unknown;
|
|
12
|
+
export declare const searchIcon: '<svg fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /></svg>';
|
|
13
|
+
export declare const spinnerIcon: '<svg class="animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>';
|
|
14
|
+
export declare const rightIcon: unknown;
|
|
15
|
+
/*
|
|
16
|
+
* Forwarded to the TextInput this renders (stacksjs/stx#2043).
|
|
17
|
+
*
|
|
18
|
+
* A wrapper that does not pass them through is as unsubmittable as a control
|
|
19
|
+
* that never accepted them: the inner input is the one that lands in FormData.
|
|
20
|
+
* `type` is the wrapper's own business, but `name`, `autocomplete` and `form`
|
|
21
|
+
* belong to the caller.
|
|
22
|
+
*/
|
|
23
|
+
export declare const name: unknown;
|
|
24
|
+
export declare const autocomplete: unknown;
|
|
25
|
+
export declare const form: unknown;
|
|
26
|
+
export declare const inputMode: unknown;
|
|
27
|
+
export declare const enterKeyHint: unknown;
|
|
28
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: string, placeholder?: string, disabled?: unknown, size?: string, error?: unknown, label?: string, helperText?: string, loading?: unknown, className?: string, name?: string, autocomplete?: unknown, autoComplete?: string, form?: string, inputMode?: unknown, inputmode?: string, enterKeyHint?: unknown, enterkeyhint?: string }>;
|
|
29
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const value: unknown;
|
|
4
|
+
export declare const placeholder: unknown;
|
|
5
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const readonly: ReturnType<typeof $bool>;
|
|
7
|
+
export declare const size: unknown;
|
|
8
|
+
export declare const error: ReturnType<typeof $bool>;
|
|
9
|
+
export declare const label: unknown;
|
|
10
|
+
export declare const helperText: unknown;
|
|
11
|
+
export declare const required: ReturnType<typeof $bool>;
|
|
12
|
+
export declare const leftIcon: unknown;
|
|
13
|
+
export declare const rightIcon: unknown;
|
|
14
|
+
export declare const clearable: ReturnType<typeof $bool>;
|
|
15
|
+
export declare const maxLength: unknown;
|
|
16
|
+
export declare const showCount: ReturnType<typeof $bool>;
|
|
17
|
+
export declare const className: unknown;
|
|
18
|
+
export declare const inputClassName: unknown;
|
|
19
|
+
/*
|
|
20
|
+
* Padding decides the height here too, with no `h-*` to override it: an app
|
|
21
|
+
* passing its own `py-1.5` got the padding it asked for and the height it did
|
|
22
|
+
* not, and `className` cannot beat `h-10` at equal specificity
|
|
23
|
+
* (stacksjs/stx#1993).
|
|
24
|
+
*
|
|
25
|
+
* `lg` also needed a padding step adjusted - py-3 around a 1.75rem line-height
|
|
26
|
+
* is 3.25rem of content inside a declared 3rem box - so py-2.5 lands on the
|
|
27
|
+
* 3rem it always claimed. sm and md were already exact.
|
|
28
|
+
*/
|
|
29
|
+
/*
|
|
30
|
+
* md -- the size nearly every form uses -- reads the density roles, so an
|
|
31
|
+
* app sets its own field size with --stx-control-px, --stx-control-py,
|
|
32
|
+
* --stx-control-text and --stx-control-leading instead of a className
|
|
33
|
+
* that ties with py-2 on specificity. The fallbacks are px-4 / py-2 /
|
|
34
|
+
* text-base, so nothing moves by default (stacksjs/stx#1993).
|
|
35
|
+
* @defaultValue `{ sm: 'h-4 w-4', md: 'h-5 w-5', lg: 'h-6 w-6' }`
|
|
36
|
+
*/
|
|
37
|
+
declare const iconSizeClasses: {
|
|
38
|
+
/** @defaultValue 'h-4 w-4' */
|
|
39
|
+
sm: string;
|
|
40
|
+
/** @defaultValue 'h-5 w-5' */
|
|
41
|
+
md: string;
|
|
42
|
+
/** @defaultValue 'h-6 w-6' */
|
|
43
|
+
lg: string
|
|
44
|
+
};
|
|
45
|
+
/*
|
|
46
|
+
* The two halves of the validity state, exported so the CLIENT can swap them
|
|
47
|
+
* (stacksjs/stx#2047).
|
|
48
|
+
*
|
|
49
|
+
* `error` was read once on the server, like `disabled` and `loading` used to
|
|
50
|
+
* be -- and validity is the clearest case of state that is not known at render
|
|
51
|
+
* time: a form posted with fetch learns it after the submit, with no
|
|
52
|
+
* re-render. So a field could never BECOME invalid, which made the component a
|
|
53
|
+
* step backwards from a plain <input> for exactly the forms it is for.
|
|
54
|
+
*
|
|
55
|
+
* Toggled as an object binding rather than a whole class string, because a
|
|
56
|
+
* reactive class string MERGES with the static one -- measured, the element
|
|
57
|
+
* ends up carrying `ring-line-strong` and `ring-danger-line` at once, and
|
|
58
|
+
* which wins is then CSS source order rather than anything this file controls.
|
|
59
|
+
* Per-class toggling removes one set as it adds the other.
|
|
60
|
+
*/
|
|
61
|
+
export declare const stateInvalidClasses: 'ring-danger-line text-danger-fg placeholder-danger focus:ring-danger-focus';
|
|
62
|
+
export declare const stateValidClasses: 'ring-line-strong text-fg placeholder-fg-soft focus:ring-accent';
|
|
63
|
+
export declare const inputClasses: unknown;
|
|
64
|
+
export declare const labelClasses: unknown;
|
|
65
|
+
export declare const helperClasses: unknown;
|
|
66
|
+
export declare const iconClasses: unknown;
|
|
67
|
+
/*
|
|
68
|
+
* Ids unique to this instance.
|
|
69
|
+
*
|
|
70
|
+
* These were derived from the LABEL or hardcoded outright, so two of these on
|
|
71
|
+
* one page -- an ordinary form -- emitted the same id twice. `<label for>`
|
|
72
|
+
* then activated the FIRST field from every label, and `aria-describedby`
|
|
73
|
+
* pointed every field's description at the first one's helper text. A label
|
|
74
|
+
* containing a space also produced an invalid id, `input-First name`, which
|
|
75
|
+
* getElementById and querySelector cannot address at all.
|
|
76
|
+
*
|
|
77
|
+
* `$uid` is unique per instance and stable across renders, which is what an id
|
|
78
|
+
* has to be (utils.ts explains why a render that changes its own bytes is
|
|
79
|
+
* uncacheable). The `id` prop overrides it, for a caller that needs to point
|
|
80
|
+
* its own `for` or `aria-describedby` at this control.
|
|
81
|
+
*/
|
|
82
|
+
export declare const inputId: unknown;
|
|
83
|
+
export declare const helperId: string;
|
|
84
|
+
/*
|
|
85
|
+
* The attributes that make this a form control (stacksjs/stx#2043).
|
|
86
|
+
*
|
|
87
|
+
* A control with no `name` is not a form control in the HTML sense: it is left
|
|
88
|
+
* out of FormData, out of form.elements.namedItem(), and out of an ordinary
|
|
89
|
+
* non-JS POST. A form built from these components submitted nothing for every
|
|
90
|
+
* field, silently -- which is how six apps read their forms.
|
|
91
|
+
*
|
|
92
|
+
* `autocomplete` is separate and just as load-bearing: it is how the browser
|
|
93
|
+
* and a password manager identify a field, so a password input without
|
|
94
|
+
* `autocomplete="current-password"` is never offered for autofill and is not
|
|
95
|
+
* recognised as part of a sign-in form at all.
|
|
96
|
+
*
|
|
97
|
+
* Emitted only when given, so a control that passes none of them renders
|
|
98
|
+
* exactly the markup it did before.
|
|
99
|
+
*/
|
|
100
|
+
export declare const name: unknown;
|
|
101
|
+
export declare const autocomplete: unknown;
|
|
102
|
+
export declare const form: unknown;
|
|
103
|
+
export declare const inputMode: unknown;
|
|
104
|
+
export declare const enterKeyHint: unknown;
|
|
105
|
+
/*
|
|
106
|
+
* The text-like input types (stacksjs/stx#2059).
|
|
107
|
+
*
|
|
108
|
+
* `type` was hard-coded to text, so a form with a date, a time, a URL or a
|
|
109
|
+
* phone number in it had to mix library and native controls -- the
|
|
110
|
+
* inconsistency the library exists to remove. email, number and password have
|
|
111
|
+
* components of their own but are accepted here too. Anything else (checkbox,
|
|
112
|
+
* file, range...) is not a text field, and is served as text rather than as a
|
|
113
|
+
* control this markup was not drawn for.
|
|
114
|
+
* @defaultValue `['text', 'date', 'time', 'datetime-local', 'month', 'week', 'url', 'tel', 'color', 'search', 'email', 'number', 'password']`
|
|
115
|
+
*/
|
|
116
|
+
declare const TEXT_TYPES: string[];
|
|
117
|
+
export declare const type: unknown;
|
|
118
|
+
/*
|
|
119
|
+
* The constraint attributes, each emitted only when given AND only on the
|
|
120
|
+
* types HTML applies it to, so a control renders exactly the markup it did
|
|
121
|
+
* before unless the caller asked for something it can use: min/max/step
|
|
122
|
+
* bound the date, time and number types; pattern, minlength, maxlength and
|
|
123
|
+
* size the free-text ones; list every type but password.
|
|
124
|
+
* @defaultValue `['date', 'time', 'datetime-local', 'month', 'week', 'number']`
|
|
125
|
+
*/
|
|
126
|
+
declare const RANGED_TYPES: string[];
|
|
127
|
+
/** @defaultValue `['text', 'search', 'url', 'tel', 'email', 'password']` */
|
|
128
|
+
declare const FREE_TEXT_TYPES: string[];
|
|
129
|
+
declare const given: (v) => boolean;
|
|
130
|
+
declare const ranged: ReturnType<typeof RANGED_TYPES.includes>;
|
|
131
|
+
export declare const freeText: ReturnType<typeof FREE_TEXT_TYPES.includes>;
|
|
132
|
+
export declare const min: unknown;
|
|
133
|
+
export declare const max: unknown;
|
|
134
|
+
export declare const step: unknown;
|
|
135
|
+
export declare const pattern: unknown;
|
|
136
|
+
export declare const minLength: unknown;
|
|
137
|
+
/*
|
|
138
|
+
* The HTML `size` attribute (a width in characters). Not `size`, which is
|
|
139
|
+
* already this component's sm / md / lg.
|
|
140
|
+
*/
|
|
141
|
+
export declare const htmlSize: unknown;
|
|
142
|
+
export declare const list: boolean;
|
|
143
|
+
export declare const autofocus: ReturnType<typeof $bool>;
|
|
144
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: string, placeholder?: string, disabled?: unknown, readonly?: unknown, size?: string, error?: unknown, label?: string, helperText?: string, required?: unknown, leftIcon?: string, rightIcon?: string, clearable?: unknown, maxLength?: unknown, maxlength?: unknown, showCount?: unknown, className?: string, inputClassName?: string, id?: string, name?: string, autocomplete?: unknown, autoComplete?: string, form?: string, inputMode?: unknown, inputmode?: string, enterKeyHint?: unknown, enterkeyhint?: string, type?: unknown, min?: unknown, max?: unknown, step?: unknown, pattern?: unknown, minLength?: unknown, minlength?: unknown, htmlSize?: unknown, list?: unknown, autofocus?: unknown }> & { readonly __stxExposed?: { value: unknown, clear: unknown } }
|
|
145
|
+
export default __dtsx_component__;
|
package/dist/ui/input/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { PropSchema, ValidationResult } from '../../utils/prop-validation';
|
|
2
|
+
/**
|
|
3
|
+
* Base input prop validation schema
|
|
4
|
+
*/
|
|
5
|
+
declare const baseInputPropSchema: PropSchema;
|
|
2
6
|
/**
|
|
3
7
|
* TextInput prop validation schema
|
|
4
8
|
*/
|
|
@@ -7,6 +11,14 @@ export declare const textInputPropSchema: PropSchema;
|
|
|
7
11
|
* NumberInput prop validation schema
|
|
8
12
|
*/
|
|
9
13
|
export declare const numberInputPropSchema: PropSchema;
|
|
14
|
+
/**
|
|
15
|
+
* PasswordInput prop validation schema
|
|
16
|
+
*/
|
|
17
|
+
declare const passwordInputPropSchema: PropSchema;
|
|
18
|
+
/**
|
|
19
|
+
* SearchInput prop validation schema
|
|
20
|
+
*/
|
|
21
|
+
declare const searchInputPropSchema: PropSchema;
|
|
10
22
|
/**
|
|
11
23
|
* Validate TextInput component props
|
|
12
24
|
*/
|
|
@@ -79,8 +91,8 @@ export declare interface SearchInputProps extends Omit<BaseInputProps, 'placehol
|
|
|
79
91
|
}
|
|
80
92
|
/** The text-like input types `TextInput` renders; anything else is served as `text`. */
|
|
81
93
|
export type TextInputType = 'text' | 'date' | 'time' | 'datetime-local' | 'month' | 'week' | 'url' | 'tel' | 'color' | 'search' | 'email' | 'number' | 'password';
|
|
82
|
-
export { default as EmailInput } from './EmailInput
|
|
83
|
-
export { default as NumberInput } from './NumberInput
|
|
84
|
-
export { default as PasswordInput } from './PasswordInput
|
|
85
|
-
export { default as SearchInput } from './SearchInput
|
|
86
|
-
export { default as TextInput } from './TextInput
|
|
94
|
+
export { default as EmailInput } from './EmailInput';
|
|
95
|
+
export { default as NumberInput } from './NumberInput';
|
|
96
|
+
export { default as PasswordInput } from './PasswordInput';
|
|
97
|
+
export { default as SearchInput } from './SearchInput';
|
|
98
|
+
export { default as TextInput } from './TextInput';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare function selectValue(v: unknown): void;
|
|
3
|
+
declare function open(): void;
|
|
4
|
+
declare function close(): void;
|
|
5
|
+
declare function toggle(): void;
|
|
6
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
7
|
+
export declare const value: unknown;
|
|
8
|
+
export declare const valueJson: unknown;
|
|
9
|
+
export declare const multiple: ReturnType<typeof $bool>;
|
|
10
|
+
export declare const className: unknown;
|
|
11
|
+
export declare const as: unknown;
|
|
12
|
+
export declare const listboxClasses: unknown;
|
|
13
|
+
export declare const listboxInstanceId: unknown;
|
|
14
|
+
/*
|
|
15
|
+
* JSON built on the server and emitted raw, rather than a 'null' sentinel
|
|
16
|
+
* through an ordinary interpolation.
|
|
17
|
+
*
|
|
18
|
+
* A `value === undefined ? 'null' : value` ternary was meant to put the bare
|
|
19
|
+
* token null into the script. An interpolation QUOTES a string, so what it
|
|
20
|
+
* emitted was the four-character string "null" -- truthy, in the one place a
|
|
21
|
+
* value is meant to be absent. JSON.stringify produces the correct literal for
|
|
22
|
+
* every type, null included, and raw interpolation passes it through unquoted.
|
|
23
|
+
* Calendar and DateRangePicker already avoid this sentinel and say why
|
|
24
|
+
* (stacksjs/stx#1981).
|
|
25
|
+
*/
|
|
26
|
+
declare const initialValue: {};
|
|
27
|
+
declare const isOpen: ReturnType<typeof state>;
|
|
28
|
+
declare const selected: ReturnType<typeof state>;
|
|
29
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: unknown, multiple?: unknown, className?: string, as?: string }> & { readonly __stxExposed?: { isOpen: typeof isOpen, selected: typeof selected, toggle: typeof toggle, open: typeof open, close: typeof close, selectValue: typeof selectValue } }
|
|
30
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
6
|
+
export declare const buttonClasses: unknown;
|
|
7
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string, disabled?: unknown }>;
|
|
8
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
6
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const value: unknown;
|
|
4
|
+
export declare const disabled: ReturnType<typeof $bool>;
|
|
5
|
+
export declare const className: unknown;
|
|
6
|
+
export declare const as: unknown;
|
|
7
|
+
export declare const optionClasses: unknown;
|
|
8
|
+
export declare const valueJson: unknown;
|
|
9
|
+
declare type __DtsxStxComponentType = DefineComponent<{ value?: unknown, disabled?: unknown, className?: string, as?: string }>;
|
|
10
|
+
export default __dtsx_component__;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
3
|
+
export declare const className: unknown;
|
|
4
|
+
export declare const as: unknown;
|
|
5
|
+
export declare const optionsClasses: unknown;
|
|
6
|
+
declare type __DtsxStxComponentType = DefineComponent<{ className?: string, as?: string }>;
|
|
7
|
+
export default __dtsx_component__;
|
|
@@ -27,8 +27,8 @@ export declare interface ListboxLabelProps {
|
|
|
27
27
|
className?: string
|
|
28
28
|
as?: string
|
|
29
29
|
}
|
|
30
|
-
export { default as Listbox } from './Listbox
|
|
31
|
-
export { default as ListboxButton } from './ListboxButton
|
|
32
|
-
export { default as ListboxLabel } from './ListboxLabel
|
|
33
|
-
export { default as ListboxOption } from './ListboxOption
|
|
34
|
-
export { default as ListboxOptions } from './ListboxOptions
|
|
30
|
+
export { default as Listbox } from './Listbox';
|
|
31
|
+
export { default as ListboxButton } from './ListboxButton';
|
|
32
|
+
export { default as ListboxLabel } from './ListboxLabel';
|
|
33
|
+
export { default as ListboxOption } from './ListboxOption';
|
|
34
|
+
export { default as ListboxOptions } from './ListboxOptions';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
+
/*
|
|
3
|
+
* Whether the router should own this link.
|
|
4
|
+
*
|
|
5
|
+
* The SPA router intercepts `[data-stx-link]` and nothing else, so a plain
|
|
6
|
+
* `<a href>` here was a full document load: the runtime rebooted, every signal
|
|
7
|
+
* and store was discarded, and the screen flashed white. On a phone this is
|
|
8
|
+
* the primary navigation control, so the app's main interaction was its worst
|
|
9
|
+
* one - the single largest reason a wrapped build feels like a browser rather
|
|
10
|
+
* than an app. stacksjs/stx#1988
|
|
11
|
+
*
|
|
12
|
+
* An absolute URL, a scheme (mailto:, tel:), a protocol-relative URL and a
|
|
13
|
+
* bare fragment are left to the browser: the router does not handle those, and
|
|
14
|
+
* claiming them would break a tab that points off-site.
|
|
15
|
+
*/
|
|
16
|
+
declare function routerOwns(url: unknown): boolean;
|
|
17
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
18
|
+
/** One pill. See `FilterChips` for why a menu chip is not a toggle chip. */
|
|
19
|
+
export declare const label: unknown;
|
|
20
|
+
export declare const href: unknown;
|
|
21
|
+
export declare const active: ReturnType<typeof $bool>;
|
|
22
|
+
/** Opens a picker rather than toggling in place — draws a chevron. */
|
|
23
|
+
export declare const menu: ReturnType<typeof $bool>;
|
|
24
|
+
export declare const count: unknown;
|
|
25
|
+
export declare const hasCount: boolean;
|
|
26
|
+
/*
|
|
27
|
+
* `shrink-0`, because the row scrolls.
|
|
28
|
+
*
|
|
29
|
+
* Without it flexbox distributes the overflow by squeezing every chip, and a
|
|
30
|
+
* row of filters that cannot overflow instead renders as a row of ellipses.
|
|
31
|
+
*/
|
|
32
|
+
export declare const chipClasses: unknown;
|
|
33
|
+
export declare const routerOwned: ReturnType<typeof routerOwns>;
|
|
34
|
+
declare type __DtsxStxComponentType = DefineComponent<{ label?: string, href?: string, active?: unknown, menu?: unknown, count?: string }>;
|
|
35
|
+
export default __dtsx_component__;
|