lupine.components 1.1.56 → 1.1.57
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/package.json
CHANGED
|
@@ -11,6 +11,7 @@ export type ActionSheetColorPickerProps = {
|
|
|
11
11
|
/** Show the 16 preset color swatches. Default: true */
|
|
12
12
|
showPresets?: boolean;
|
|
13
13
|
zIndex?: string;
|
|
14
|
+
colorList?: string[];
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
function hexToRgb(hex: string): [number, number, number] {
|
|
@@ -55,6 +56,7 @@ export const ActionSheetColorPicker = async ({
|
|
|
55
56
|
cancelButtonText = 'Cancel',
|
|
56
57
|
showPresets = true,
|
|
57
58
|
zIndex,
|
|
59
|
+
colorList = PRESET_COLORS,
|
|
58
60
|
}: ActionSheetColorPickerProps): Promise<string | undefined> => {
|
|
59
61
|
let [r, g, b] = hexToRgb(value);
|
|
60
62
|
|
|
@@ -238,7 +240,7 @@ export const ActionSheetColorPicker = async ({
|
|
|
238
240
|
</div>
|
|
239
241
|
{showPresets && (
|
|
240
242
|
<div class='presets'>
|
|
241
|
-
{
|
|
243
|
+
{colorList.map((hex) => (
|
|
242
244
|
<div
|
|
243
245
|
class='preset-dot'
|
|
244
246
|
style={{ backgroundColor: hex }}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CssProps, bindGlobalStyle } from 'lupine.web';
|
|
2
|
+
import { isSafeAreaSupported } from '../lib/support-safe-area';
|
|
2
3
|
/**
|
|
3
4
|
How to use:
|
|
4
5
|
Notification.sendMessage(message);
|
|
@@ -56,6 +57,8 @@ export class NotificationMessage {
|
|
|
56
57
|
padding: '0 10px',
|
|
57
58
|
zIndex: 'var(--layer-notice)',
|
|
58
59
|
pointerEvents: 'none',
|
|
60
|
+
'padding-top ': isSafeAreaSupported() ? 'constant(safe-area-inset-top)' : '',
|
|
61
|
+
'padding-top': isSafeAreaSupported() ? 'env(safe-area-inset-top)' : '',
|
|
59
62
|
'>div': {
|
|
60
63
|
pointerEvents: 'auto',
|
|
61
64
|
color: 'var(--notice-color-with-bg)',
|