glassine-paper 1.0.1 → 1.1.1

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/lib/Slider.js CHANGED
@@ -3,23 +3,23 @@ import React, { useEffect, useRef } from 'react';
3
3
  /**
4
4
  * Material Design 3 Slider component
5
5
  *
6
- * @param props SliderProps
7
- * @param props.id Input id attribute
8
- * @param props.name Input name attribute
9
- * @param props.min Minimum value
10
- * @param props.max Maximum value
11
- * @param props.step Step increment
12
- * @param props.value Current value
13
- * @param props.size Size variant: 'xs', 'sm', or 'md'
14
- * @param props.orientation Orientation: 'horizontal', 'top-bottom', or 'bottom-top'
15
- * @param props.showValueIndicator Show value indicator
16
- * @param props.options Datalist options array
17
- * @param props.options[].value Option value
18
- * @param props.options[].key Optional unique key for the option
19
- * @param props.onChange Change handler function
20
- * @param props.className Additional CSS class names
21
- * @param props.style Custom inline styles
22
- * @returns JSX.Element
6
+ * @param {SliderProps} props SliderProps
7
+ * @param {string} [props.id] Input id attribute
8
+ * @param {string} [props.name] Input name attribute
9
+ * @param {number} [props.min] Minimum value
10
+ * @param {number} [props.max] Maximum value
11
+ * @param {number} [props.step] Step increment
12
+ * @param {number} props.value Current value
13
+ * @param {('xs' | 'sm' | 'md')} [props.size] Size variant: 'xs', 'sm', or 'md'
14
+ * @param {('horizontal' | 'top-bottom' | 'bottom-top')} [props.orientation] Orientation: 'horizontal', 'top-bottom', or 'bottom-top'
15
+ * @param {boolean} [props.showValueIndicator] Show value indicator
16
+ * @param {SliderOption[]} [props.options] Datalist options array
17
+ * @param {number} props.options[].value Option value
18
+ * @param {string} [props.options[].key] Optional unique key for the option
19
+ * @param {Function} [props.onChange] Change handler function
20
+ * @param {string} [props.className] Additional CSS class names
21
+ * @param {React.CSSProperties} [props.style] Custom inline styles
22
+ * @returns {JSX.Element}
23
23
  *
24
24
  * @example
25
25
  * <Slider
@@ -0,0 +1,39 @@
1
+ import React, { type CSSProperties } from 'react';
2
+ /**
3
+ * Switch component props
4
+ */
5
+ export interface SwitchProps {
6
+ id?: string;
7
+ name?: string;
8
+ disabled?: boolean;
9
+ value?: string;
10
+ checked?: boolean;
11
+ onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
12
+ className?: string;
13
+ style?: CSSProperties;
14
+ }
15
+ /**
16
+ * Material Design 3 Switch component.
17
+ *
18
+ * @param {SwitchProps} props The properties for the Switch component.
19
+ * @param {string} [props.id] The ID of the switch.
20
+ * @param {string} [props.name] The name of the switch.
21
+ * @param {boolean} [props.disabled=false] Whether the switch is disabled.
22
+ * @param {string} [props.value] The value of the switch.
23
+ * @param {boolean} [props.checked] Whether the switch is checked.
24
+ * @param {Function} [props.onClick] The function to call when the switch is clicked.
25
+ * @param {string} [props.className] Additional CSS classes to apply to the switch.
26
+ * @param {CSSProperties} [props.style] Additional CSS styles to apply to the switch.
27
+ * @returns {JSX.Element} A Switch component.
28
+ *
29
+ * @example
30
+ * <Switch
31
+ * id="my-switch"
32
+ * name="my-switch"
33
+ * checked={isChecked}
34
+ * onClick={() => setIsChecked(!isChecked)}
35
+ * />
36
+ */
37
+ export declare const Switch: React.FC<SwitchProps>;
38
+ export default Switch;
39
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../src/components/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAyBxC,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/lib/Switch.js ADDED
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React, {} from 'react';
3
+ /**
4
+ * Material Design 3 Switch component.
5
+ *
6
+ * @param {SwitchProps} props The properties for the Switch component.
7
+ * @param {string} [props.id] The ID of the switch.
8
+ * @param {string} [props.name] The name of the switch.
9
+ * @param {boolean} [props.disabled=false] Whether the switch is disabled.
10
+ * @param {string} [props.value] The value of the switch.
11
+ * @param {boolean} [props.checked] Whether the switch is checked.
12
+ * @param {Function} [props.onClick] The function to call when the switch is clicked.
13
+ * @param {string} [props.className] Additional CSS classes to apply to the switch.
14
+ * @param {CSSProperties} [props.style] Additional CSS styles to apply to the switch.
15
+ * @returns {JSX.Element} A Switch component.
16
+ *
17
+ * @example
18
+ * <Switch
19
+ * id="my-switch"
20
+ * name="my-switch"
21
+ * checked={isChecked}
22
+ * onClick={() => setIsChecked(!isChecked)}
23
+ * />
24
+ */
25
+ export const Switch = ({ id, name, disabled = false, value, checked, onClick, className = '', style = {}, }) => {
26
+ const classes = ['switch', className];
27
+ return (_jsx("input", { id: id, name: name, className: classes.join(' '), type: "checkbox", style: style, disabled: disabled, value: value, checked: checked, onClick: (event) => (onClick ? onClick(event) : undefined) }));
28
+ };
29
+ export default Switch;
30
+ //# sourceMappingURL=Switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../src/components/Switch.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AAgBlD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC5C,EAAE,EACF,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,GACX,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEtC,OAAO,CACL,gBACE,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAC5B,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAC1D,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/lib/Tabs.d.ts CHANGED
@@ -17,19 +17,19 @@ export interface TabsProps {
17
17
  /**
18
18
  * Material Design 3 Tabs component
19
19
  *
20
- * @param props TabsProps
21
- * @param props.id Element id
22
- * @param props.items Array of TabItem configurations
23
- * @param props.items[].key Unique key for the item
24
- * @param props.items[].id Element id for the item
25
- * @param props.items[].label Label text
26
- * @param props.items[].leadingIcon Leading icon element
27
- * @param props.items[].active Active state
28
- * @param props.items[].disabled Disabled state
29
- * @param props.items[].onClick Click handler
30
- * @param props.items[].href Link URL (renders as anchor tag)
31
- * @param props.style Custom inline styles
32
- * @returns JSX.Element
20
+ * @param {TabsProps} props TabsProps
21
+ * @param {string} [props.id] Element id
22
+ * @param {Iterable<TabItemProps>} props.items Array of TabItem configurations
23
+ * @param {(string | number)} [props.items[].key] Unique key for the item
24
+ * @param {string} [props.items[].id] Element id for the item
25
+ * @param {string} props.items[].label Label text
26
+ * @param {React.ReactNode} [props.items[].leadingIcon] Leading icon element
27
+ * @param {boolean} [props.items[].active] Active state
28
+ * @param {boolean} [props.items[].disabled] Disabled state
29
+ * @param {Function} [props.items[].onClick] Click handler
30
+ * @param {string} [props.items[].href] Link URL (renders as anchor tag)
31
+ * @param {React.CSSProperties} [props.style] Custom inline styles
32
+ * @returns {JSX.Element}
33
33
  *
34
34
  * @example
35
35
  * <Tabs
package/lib/Tabs.js CHANGED
@@ -7,19 +7,19 @@ const TabItem = ({ key, id, leadingIcon, label, active = false, onClick, href, }
7
7
  /**
8
8
  * Material Design 3 Tabs component
9
9
  *
10
- * @param props TabsProps
11
- * @param props.id Element id
12
- * @param props.items Array of TabItem configurations
13
- * @param props.items[].key Unique key for the item
14
- * @param props.items[].id Element id for the item
15
- * @param props.items[].label Label text
16
- * @param props.items[].leadingIcon Leading icon element
17
- * @param props.items[].active Active state
18
- * @param props.items[].disabled Disabled state
19
- * @param props.items[].onClick Click handler
20
- * @param props.items[].href Link URL (renders as anchor tag)
21
- * @param props.style Custom inline styles
22
- * @returns JSX.Element
10
+ * @param {TabsProps} props TabsProps
11
+ * @param {string} [props.id] Element id
12
+ * @param {Iterable<TabItemProps>} props.items Array of TabItem configurations
13
+ * @param {(string | number)} [props.items[].key] Unique key for the item
14
+ * @param {string} [props.items[].id] Element id for the item
15
+ * @param {string} props.items[].label Label text
16
+ * @param {React.ReactNode} [props.items[].leadingIcon] Leading icon element
17
+ * @param {boolean} [props.items[].active] Active state
18
+ * @param {boolean} [props.items[].disabled] Disabled state
19
+ * @param {Function} [props.items[].onClick] Click handler
20
+ * @param {string} [props.items[].href] Link URL (renders as anchor tag)
21
+ * @param {React.CSSProperties} [props.style] Custom inline styles
22
+ * @returns {JSX.Element}
23
23
  *
24
24
  * @example
25
25
  * <Tabs
@@ -24,25 +24,25 @@ export interface TextFieldProps {
24
24
  /**
25
25
  * Material Design 3 TextField component
26
26
  *
27
- * @param props TextFieldProps
28
- * @param props.id Input id attribute
29
- * @param props.name Input name attribute
30
- * @param props.variant Variant of the text field: 'filled' or 'outlined'
31
- * @param props.type Input type: 'text', 'email', 'number', 'password', 'tel', or 'url'
32
- * @param props.label Label text
33
- * @param props.placeholder Placeholder text (should match label)
34
- * @param props.value Current value
35
- * @param props.error Error state
36
- * @param props.disabled Disabled state
37
- * @param props.supportingText Supporting text or error message
38
- * @param props.leadingIcon Leading icon element
39
- * @param props.trailingIcon Trailing icon element
40
- * @param props.onChange Change handler
41
- * @param props.onBlur Blur handler
42
- * @param props.onFocus Focus handler
43
- * @param props.className Additional CSS class names
44
- * @param props.style Custom inline styles
45
- * @returns JSX.Element
27
+ * @param {TextFieldProps} props TextFieldProps
28
+ * @param {string} [props.id] Input id attribute
29
+ * @param {string} [props.name] Input name attribute
30
+ * @param {('filled' | 'outlined')} [props.variant] Variant of the text field: 'filled' or 'outlined'
31
+ * @param {('text' | 'email' | 'number' | 'password' | 'tel' | 'url')} [props.type] Input type: 'text', 'email', 'number', 'password', 'tel', or 'url'
32
+ * @param {string} props.label Label text
33
+ * @param {string} [props.placeholder] Placeholder text (should match label)
34
+ * @param {(string | number)} [props.value] Current value
35
+ * @param {boolean} [props.error] Error state
36
+ * @param {boolean} [props.disabled] Disabled state
37
+ * @param {string} [props.supportingText] Supporting text or error message
38
+ * @param {React.ReactNode} [props.leadingIcon] Leading icon element
39
+ * @param {React.ReactNode} [props.trailingIcon] Trailing icon element
40
+ * @param {Function} [props.onChange] Change handler
41
+ * @param {Function} [props.onBlur] Blur handler
42
+ * @param {Function} [props.onFocus] Focus handler
43
+ * @param {string} [props.className] Additional CSS class names
44
+ * @param {React.CSSProperties} [props.style] Custom inline styles
45
+ * @returns {JSX.Element}
46
46
  *
47
47
  * @example
48
48
  * <TextField
package/lib/TextField.js CHANGED
@@ -3,25 +3,25 @@ import React, {} from 'react';
3
3
  /**
4
4
  * Material Design 3 TextField component
5
5
  *
6
- * @param props TextFieldProps
7
- * @param props.id Input id attribute
8
- * @param props.name Input name attribute
9
- * @param props.variant Variant of the text field: 'filled' or 'outlined'
10
- * @param props.type Input type: 'text', 'email', 'number', 'password', 'tel', or 'url'
11
- * @param props.label Label text
12
- * @param props.placeholder Placeholder text (should match label)
13
- * @param props.value Current value
14
- * @param props.error Error state
15
- * @param props.disabled Disabled state
16
- * @param props.supportingText Supporting text or error message
17
- * @param props.leadingIcon Leading icon element
18
- * @param props.trailingIcon Trailing icon element
19
- * @param props.onChange Change handler
20
- * @param props.onBlur Blur handler
21
- * @param props.onFocus Focus handler
22
- * @param props.className Additional CSS class names
23
- * @param props.style Custom inline styles
24
- * @returns JSX.Element
6
+ * @param {TextFieldProps} props TextFieldProps
7
+ * @param {string} [props.id] Input id attribute
8
+ * @param {string} [props.name] Input name attribute
9
+ * @param {('filled' | 'outlined')} [props.variant] Variant of the text field: 'filled' or 'outlined'
10
+ * @param {('text' | 'email' | 'number' | 'password' | 'tel' | 'url')} [props.type] Input type: 'text', 'email', 'number', 'password', 'tel', or 'url'
11
+ * @param {string} props.label Label text
12
+ * @param {string} [props.placeholder] Placeholder text (should match label)
13
+ * @param {(string | number)} [props.value] Current value
14
+ * @param {boolean} [props.error] Error state
15
+ * @param {boolean} [props.disabled] Disabled state
16
+ * @param {string} [props.supportingText] Supporting text or error message
17
+ * @param {React.ReactNode} [props.leadingIcon] Leading icon element
18
+ * @param {React.ReactNode} [props.trailingIcon] Trailing icon element
19
+ * @param {Function} [props.onChange] Change handler
20
+ * @param {Function} [props.onBlur] Blur handler
21
+ * @param {Function} [props.onFocus] Focus handler
22
+ * @param {string} [props.className] Additional CSS class names
23
+ * @param {React.CSSProperties} [props.style] Custom inline styles
24
+ * @returns {JSX.Element}
25
25
  *
26
26
  * @example
27
27
  * <TextField
package/lib/Toolbar.d.ts CHANGED
@@ -22,24 +22,24 @@ export interface ToolbarProps {
22
22
  /**
23
23
  * Material Design 3 Toolbar component
24
24
  *
25
- * @param props ToolbarProps
26
- * @param props.id Element id
27
- * @param props.items Array of ToolbarItem configurations
28
- * @param props.items[].key Unique key for the item
29
- * @param props.items[].id Element id for the item
30
- * @param props.items[].label Label text
31
- * @param props.items[].icon Icon element
32
- * @param props.items[].disabled Disabled state
33
- * @param props.items[].onClick Click handler
34
- * @param props.items[].href Link URL (renders as anchor tag)
35
- * @param props.items[].toggle Renders as toggle button if true
36
- * @param props.items[].checked Toggle button checked state
37
- * @param props.items[].primary Primary button styling if true
38
- * @param props.items[].fab Renders as floating action button if true on floating toolbars
39
- * @param props.variant Toolbar variant: 'docked' or 'floating'
40
- * @param props.color Toolbar color scheme: 'standard' or 'vibrant'
41
- * @param props.style Custom inline styles
42
- * @returns JSX.Element
25
+ * @param {ToolbarProps} props ToolbarProps
26
+ * @param {string} [props.id] Element id
27
+ * @param {Iterable<ToolbarItemProps>} props.items Array of ToolbarItem configurations
28
+ * @param {(string | number)} [props.items[].key] Unique key for the item
29
+ * @param {string} [props.items[].id] Element id for the item
30
+ * @param {string} [props.items[].label] Label text
31
+ * @param {React.ReactNode} [props.items[].icon] Icon element
32
+ * @param {boolean} [props.items[].disabled] Disabled state
33
+ * @param {Function} [props.items[].onClick] Click handler
34
+ * @param {string} [props.items[].href] Link URL (renders as anchor tag)
35
+ * @param {boolean} [props.items[].toggle] Renders as toggle button if true
36
+ * @param {boolean} [props.items[].checked] Toggle button checked state
37
+ * @param {boolean} [props.items[].primary] Primary button styling if true
38
+ * @param {boolean} [props.items[].fab] Renders as floating action button if true on floating toolbars
39
+ * @param {('docked' | 'floating')} [props.variant] Toolbar variant: 'docked' or 'floating'
40
+ * @param {('standard' | 'vibrant')} [props.color] Toolbar color scheme: 'standard' or 'vibrant'
41
+ * @param {React.CSSProperties} [props.style] Custom inline styles
42
+ * @returns {JSX.Element}
43
43
  *
44
44
  * @example
45
45
  * <Toolbar
package/lib/Toolbar.js CHANGED
@@ -7,24 +7,24 @@ const ToolbarItem = ({ key, id, label, icon, disabled = false, onClick, href, to
7
7
  /**
8
8
  * Material Design 3 Toolbar component
9
9
  *
10
- * @param props ToolbarProps
11
- * @param props.id Element id
12
- * @param props.items Array of ToolbarItem configurations
13
- * @param props.items[].key Unique key for the item
14
- * @param props.items[].id Element id for the item
15
- * @param props.items[].label Label text
16
- * @param props.items[].icon Icon element
17
- * @param props.items[].disabled Disabled state
18
- * @param props.items[].onClick Click handler
19
- * @param props.items[].href Link URL (renders as anchor tag)
20
- * @param props.items[].toggle Renders as toggle button if true
21
- * @param props.items[].checked Toggle button checked state
22
- * @param props.items[].primary Primary button styling if true
23
- * @param props.items[].fab Renders as floating action button if true on floating toolbars
24
- * @param props.variant Toolbar variant: 'docked' or 'floating'
25
- * @param props.color Toolbar color scheme: 'standard' or 'vibrant'
26
- * @param props.style Custom inline styles
27
- * @returns JSX.Element
10
+ * @param {ToolbarProps} props ToolbarProps
11
+ * @param {string} [props.id] Element id
12
+ * @param {Iterable<ToolbarItemProps>} props.items Array of ToolbarItem configurations
13
+ * @param {(string | number)} [props.items[].key] Unique key for the item
14
+ * @param {string} [props.items[].id] Element id for the item
15
+ * @param {string} [props.items[].label] Label text
16
+ * @param {React.ReactNode} [props.items[].icon] Icon element
17
+ * @param {boolean} [props.items[].disabled] Disabled state
18
+ * @param {Function} [props.items[].onClick] Click handler
19
+ * @param {string} [props.items[].href] Link URL (renders as anchor tag)
20
+ * @param {boolean} [props.items[].toggle] Renders as toggle button if true
21
+ * @param {boolean} [props.items[].checked] Toggle button checked state
22
+ * @param {boolean} [props.items[].primary] Primary button styling if true
23
+ * @param {boolean} [props.items[].fab] Renders as floating action button if true on floating toolbars
24
+ * @param {('docked' | 'floating')} [props.variant] Toolbar variant: 'docked' or 'floating'
25
+ * @param {('standard' | 'vibrant')} [props.color] Toolbar color scheme: 'standard' or 'vibrant'
26
+ * @param {React.CSSProperties} [props.style] Custom inline styles
27
+ * @returns {JSX.Element}
28
28
  *
29
29
  * @example
30
30
  * <Toolbar