@knitui/components 0.1.1 → 0.3.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 +8 -15
- package/lib/typescript/ActionIcon/ActionIcon.d.ts +7 -7
- package/lib/typescript/Alert/Alert.d.ts +7 -7
- package/lib/typescript/Autocomplete/Autocomplete.d.ts +2 -2
- package/lib/typescript/Avatar/Avatar.d.ts +23 -23
- package/lib/typescript/Badge/Badge.d.ts +7 -7
- package/lib/typescript/Blockquote/Blockquote.d.ts +7 -7
- package/lib/typescript/Button/Button.d.ts +9 -9
- package/lib/typescript/Checkbox/Checkbox.d.ts +8 -8
- package/lib/typescript/Chip/Chip.d.ts +7 -7
- package/lib/typescript/CloseButton/CloseButton.d.ts +7 -7
- package/lib/typescript/ColorSwatch/ColorSwatch.d.ts +7 -7
- package/lib/typescript/Combobox/Combobox.d.ts +3 -3
- package/lib/typescript/Combobox/index.d.ts +3 -3
- package/lib/typescript/Container/Container.d.ts +1 -1
- package/lib/typescript/Dialog/Dialog.d.ts +13 -13
- package/lib/typescript/Image/Image.d.ts +16 -16
- package/lib/typescript/Image/createImage.d.ts +19 -19
- package/lib/typescript/Indicator/Indicator.d.ts +2 -2
- package/lib/typescript/Input/Input.d.ts +13 -13
- package/lib/typescript/Input/Input.native.d.ts +11 -11
- package/lib/typescript/Input/shared.d.ts +9 -9
- package/lib/typescript/InputBase/InputBase.d.ts +2 -2
- package/lib/typescript/Kbd/Kbd.d.ts +1 -1
- package/lib/typescript/Mark/Mark.d.ts +1 -1
- package/lib/typescript/MaskInput/MaskInput.d.ts +2 -2
- package/lib/typescript/Menu/Menu.d.ts +2 -2
- package/lib/typescript/Modal/Modal.d.ts +13 -13
- package/lib/typescript/MultiSelect/MultiSelect.d.ts +2 -2
- package/lib/typescript/NumberInput/NumberInput.d.ts +5 -5
- package/lib/typescript/Pagination/Pagination.d.ts +5 -5
- package/lib/typescript/Paper/Paper.d.ts +1 -1
- package/lib/typescript/PasswordInput/PasswordInput.d.ts +11 -11
- package/lib/typescript/Pill/Pill.d.ts +13 -13
- package/lib/typescript/PinInput/PinInput.d.ts +13 -13
- package/lib/typescript/Progress/Progress.d.ts +9 -9
- package/lib/typescript/Radio/Radio.d.ts +8 -8
- package/lib/typescript/SegmentedControl/SegmentedControl.d.ts +7 -7
- package/lib/typescript/Select/Select.d.ts +2 -2
- package/lib/typescript/Stepper/Stepper.d.ts +2 -2
- package/lib/typescript/Switch/Switch.d.ts +7 -7
- package/lib/typescript/Table/Table.d.ts +4 -4
- package/lib/typescript/TableOfContents/TableOfContents.d.ts +3 -3
- package/lib/typescript/Tabs/Tabs.d.ts +6 -6
- package/lib/typescript/TagsInput/TagsInput.d.ts +2 -2
- package/lib/typescript/TextInput/TextInput.d.ts +2 -2
- package/lib/typescript/Textarea/Textarea.d.ts +2 -2
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts +7 -7
- package/lib/typescript/TreeSelect/TreeSelect.d.ts +7 -7
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -153,23 +153,16 @@ The slot keys for a component are captured by its exported `…Styles` type (e.g
|
|
|
153
153
|
`slotStyles` so an unknown slot key throws rather than being silently ignored.
|
|
154
154
|
The slot machinery itself (`createSlot`, `defineSlots`) lives in `@knitui/core`.
|
|
155
155
|
|
|
156
|
-
###
|
|
156
|
+
### Theming & customization
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
Brand the whole kit with `createTheme` / `extendTheme` from `@knitui/core` and
|
|
159
|
+
feed the result to `<Provider config={…}>` — see the
|
|
160
|
+
[`@knitui/core` README](../core/README.md#custom-branding--createtheme).
|
|
160
161
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
components: {
|
|
166
|
-
Button: { defaults: { size: "lg", variant: "light" } },
|
|
167
|
-
Card: { template: "surface1" },
|
|
168
|
-
},
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
export const App = ({ children }) => <Provider config={config}>{children}</Provider>;
|
|
172
|
-
```
|
|
162
|
+
> A per-component defaults/theming layer (`components` in `createTheme`,
|
|
163
|
+
> `defineComponentDefaults`) is planned but **not yet implemented**. For now,
|
|
164
|
+
> recolor with the theme system (`theme="teal"` / `<Theme name="teal">`) and set
|
|
165
|
+
> default props by wrapping your own thin component.
|
|
173
166
|
|
|
174
167
|
### Control-system contract
|
|
175
168
|
|
|
@@ -14,8 +14,8 @@ type ActionIconVariant = "filled" | "light" | "outline" | "subtle" | "transparen
|
|
|
14
14
|
* `color` prop. `loading` swaps the icon for a `Loader` and blocks interaction.
|
|
15
15
|
*/
|
|
16
16
|
declare const ActionIconFrame: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
17
|
-
size?: string | number | undefined;
|
|
18
17
|
radius?: string | number | undefined;
|
|
18
|
+
size?: string | number | undefined;
|
|
19
19
|
disabled?: boolean | undefined;
|
|
20
20
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
21
21
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
@@ -81,33 +81,33 @@ export interface ActionIconProps extends GetProps<typeof ActionIconFrame> {
|
|
|
81
81
|
gradient?: GradientValue;
|
|
82
82
|
}
|
|
83
83
|
export declare const ActionIcon: React.ForwardRefExoticComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
84
|
-
size?: string | number | undefined;
|
|
85
84
|
radius?: string | number | undefined;
|
|
85
|
+
size?: string | number | undefined;
|
|
86
86
|
disabled?: boolean | undefined;
|
|
87
87
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
88
88
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
89
89
|
}>, keyof ActionIconProps> & ActionIconProps & React.RefAttributes<import("@tamagui/web").TamaguiElement>> & import("@tamagui/web").StaticComponentObject<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
90
|
-
size?: string | number | undefined;
|
|
91
90
|
radius?: string | number | undefined;
|
|
91
|
+
size?: string | number | undefined;
|
|
92
92
|
disabled?: boolean | undefined;
|
|
93
93
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
94
94
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
95
95
|
}>, keyof ActionIconProps> & ActionIconProps, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & ActionIconProps, import("@tamagui/web").StackStyleBase, {
|
|
96
|
-
size?: string | number | undefined;
|
|
97
96
|
radius?: string | number | undefined;
|
|
97
|
+
size?: string | number | undefined;
|
|
98
98
|
disabled?: boolean | undefined;
|
|
99
99
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
100
100
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
101
101
|
}, import("@tamagui/web").StaticConfigPublic> & Omit<import("@tamagui/web").StaticConfigPublic, "staticConfig" | "styleable"> & {
|
|
102
102
|
__tama: [Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
103
|
-
size?: string | number | undefined;
|
|
104
103
|
radius?: string | number | undefined;
|
|
104
|
+
size?: string | number | undefined;
|
|
105
105
|
disabled?: boolean | undefined;
|
|
106
106
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
107
107
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
108
108
|
}>, keyof ActionIconProps> & ActionIconProps, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & ActionIconProps, import("@tamagui/web").StackStyleBase, {
|
|
109
|
-
size?: string | number | undefined;
|
|
110
109
|
radius?: string | number | undefined;
|
|
110
|
+
size?: string | number | undefined;
|
|
111
111
|
disabled?: boolean | undefined;
|
|
112
112
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
113
113
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
@@ -159,8 +159,8 @@ export declare const ActionIcon: React.ForwardRefExoticComponent<Omit<import("@t
|
|
|
159
159
|
}, import("@tamagui/web").StaticConfigPublic>;
|
|
160
160
|
};
|
|
161
161
|
Frame: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
162
|
-
size?: string | number | undefined;
|
|
163
162
|
radius?: string | number | undefined;
|
|
163
|
+
size?: string | number | undefined;
|
|
164
164
|
disabled?: boolean | undefined;
|
|
165
165
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
166
166
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
@@ -14,8 +14,8 @@ type AlertVariant = "filled" | "light" | "outline" | "default" | "transparent" |
|
|
|
14
14
|
* `role="alert"` plus wired `aria-labelledby` / `aria-describedby` for screen readers.
|
|
15
15
|
*/
|
|
16
16
|
declare const AlertFrame: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
17
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
18
17
|
radius?: string | number | undefined;
|
|
18
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
19
19
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
20
20
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "gradient" | undefined;
|
|
21
21
|
}, import("@tamagui/web").StaticConfigPublic>;
|
|
@@ -88,36 +88,36 @@ export interface AlertProps extends GetProps<typeof AlertFrame> {
|
|
|
88
88
|
gradient?: GradientValue;
|
|
89
89
|
}
|
|
90
90
|
export declare const Alert: React.ForwardRefExoticComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
91
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
92
91
|
radius?: string | number | undefined;
|
|
92
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
93
93
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
94
94
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "gradient" | undefined;
|
|
95
95
|
}>, keyof AlertProps> & AlertProps & React.RefAttributes<import("@tamagui/web").TamaguiElement>> & import("@tamagui/web").StaticComponentObject<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
96
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
97
96
|
radius?: string | number | undefined;
|
|
97
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
98
98
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
99
99
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "gradient" | undefined;
|
|
100
100
|
}>, keyof AlertProps> & AlertProps, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & AlertProps, import("@tamagui/web").StackStyleBase, {
|
|
101
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
102
101
|
radius?: string | number | undefined;
|
|
102
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
103
103
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
104
104
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "gradient" | undefined;
|
|
105
105
|
}, import("@tamagui/web").StaticConfigPublic> & Omit<import("@tamagui/web").StaticConfigPublic, "staticConfig" | "styleable"> & {
|
|
106
106
|
__tama: [Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
107
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
108
107
|
radius?: string | number | undefined;
|
|
108
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
109
109
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
110
110
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "gradient" | undefined;
|
|
111
111
|
}>, keyof AlertProps> & AlertProps, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & AlertProps, import("@tamagui/web").StackStyleBase, {
|
|
112
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
113
112
|
radius?: string | number | undefined;
|
|
113
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
114
114
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
115
115
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "gradient" | undefined;
|
|
116
116
|
}, import("@tamagui/web").StaticConfigPublic];
|
|
117
117
|
} & {
|
|
118
118
|
Frame: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
119
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
120
119
|
radius?: string | number | undefined;
|
|
120
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
121
121
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
122
122
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "gradient" | undefined;
|
|
123
123
|
}, import("@tamagui/web").StaticConfigPublic>;
|
|
@@ -243,14 +243,14 @@ export declare const Autocomplete: React.ForwardRefExoticComponent<AutocompleteP
|
|
|
243
243
|
}, import("@tamagui/web").StaticConfigPublic>;
|
|
244
244
|
/** Re-export of `Combobox.ClearButton`. */
|
|
245
245
|
ClearButton: import("@tamagui/web").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps & import("..").CloseButtonProps, import("@tamagui/web").StackStyleBase, {
|
|
246
|
-
size?: string | number | undefined;
|
|
247
246
|
radius?: string | number | undefined;
|
|
247
|
+
size?: string | number | undefined;
|
|
248
248
|
disabled?: boolean | undefined;
|
|
249
249
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
250
250
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|
|
251
251
|
}>, keyof ComboboxClearButtonProps> & ComboboxClearButtonProps, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & import("..").CloseButtonProps & ComboboxClearButtonProps, import("@tamagui/web").StackStyleBase, {
|
|
252
|
-
size?: string | number | undefined;
|
|
253
252
|
radius?: string | number | undefined;
|
|
253
|
+
size?: string | number | undefined;
|
|
254
254
|
disabled?: boolean | undefined;
|
|
255
255
|
shadow?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
256
256
|
variant?: "default" | "white" | "light" | "transparent" | "outline" | "filled" | "subtle" | "gradient" | undefined;
|