@scripso-homepad/ui 0.4.9 → 0.4.10
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/index.cjs +123 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +123 -84
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +413 -22
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.css +161 -0
- package/dist/web/index.css.map +1 -1
- package/dist/web/index.d.cts +48 -1
- package/dist/web/index.d.ts +48 -1
- package/dist/web/index.js +406 -23
- package/dist/web/index.js.map +1 -1
- package/package.json +9 -3
- package/src/components/DatePicker.tsx +37 -3
- package/src/web/components/Drawer.stories.tsx +234 -0
- package/src/web/components/Drawer.tsx +169 -0
- package/src/web/components/HistoryTimeline.tsx +46 -0
- package/src/web/components/Modal.tsx +5 -5
- package/src/web/components/TableActionButton.tsx +3 -3
- package/src/web/components/Toaster.stories.tsx +106 -0
- package/src/web/components/Toaster.tsx +92 -0
- package/src/web/components/ToasterProvider.tsx +6 -0
- package/src/web/components/drawer-scroll.css +41 -0
- package/src/web/components/sonner-toast.css +141 -0
- package/src/web/icons/TimelineCheckIcon.tsx +24 -0
- package/src/web/icons/ToastIcons.tsx +119 -0
- package/src/web/index.ts +20 -0
- package/src/web/mutation-toast.ts +33 -0
- package/src/web/toast.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -2990,6 +2990,8 @@ function DatePicker(props) {
|
|
|
2990
2990
|
containerStyle,
|
|
2991
2991
|
className,
|
|
2992
2992
|
fieldClassName,
|
|
2993
|
+
fieldStyle,
|
|
2994
|
+
fieldOutlineStyle,
|
|
2993
2995
|
panelClassName,
|
|
2994
2996
|
labelClassName,
|
|
2995
2997
|
errorClassName,
|
|
@@ -3083,96 +3085,120 @@ function DatePicker(props) {
|
|
|
3083
3085
|
closePicker();
|
|
3084
3086
|
}
|
|
3085
3087
|
}
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3088
|
+
const isFluidField = Boolean(fieldStyle) || Boolean(fieldOutlineStyle);
|
|
3089
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3090
|
+
reactNative.View,
|
|
3091
|
+
{
|
|
3092
|
+
ref: wrapperRef,
|
|
3093
|
+
style: [styles7.wrapper, isFluidField && styles7.wrapperFluid, containerStyle],
|
|
3094
|
+
children: [
|
|
3095
|
+
label ? /* @__PURE__ */ jsxRuntime.jsx(Label, { disabled, style: styles7.label, className: labelClassName, children: label }) : null,
|
|
3096
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3097
|
+
reactNative.View,
|
|
3098
|
+
{
|
|
3099
|
+
style: [
|
|
3100
|
+
fieldStyles.outline,
|
|
3101
|
+
styles7.fieldOutline,
|
|
3102
|
+
isFluidField && styles7.fieldOutlineFluid,
|
|
3103
|
+
fieldOutlineStyle
|
|
3104
|
+
],
|
|
3105
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3106
|
+
reactNative.Pressable,
|
|
3107
|
+
{
|
|
3108
|
+
ref: triggerRef,
|
|
3109
|
+
accessibilityRole: "button",
|
|
3110
|
+
accessibilityState: { disabled, expanded: open },
|
|
3111
|
+
disabled,
|
|
3112
|
+
onPress: openPicker,
|
|
3113
|
+
style: [
|
|
3114
|
+
calendarFieldMetrics.container,
|
|
3115
|
+
isFluidField && styles7.fieldContainerFluid,
|
|
3116
|
+
fieldStyles.container,
|
|
3117
|
+
fieldStyle
|
|
3118
|
+
],
|
|
3119
|
+
children: [
|
|
3120
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3121
|
+
reactNative.Text,
|
|
3122
|
+
{
|
|
3123
|
+
style: [calendarFieldMetrics.value, valueTextStyle],
|
|
3124
|
+
numberOfLines: 1,
|
|
3125
|
+
children: displayValue
|
|
3126
|
+
}
|
|
3127
|
+
),
|
|
3128
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles7.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3129
|
+
CalendarIcon,
|
|
3130
|
+
{
|
|
3131
|
+
size: CALENDAR_FIELD_ICON_SIZE,
|
|
3132
|
+
color: disabled ? colors.stormGray200 : colors.stormGray150
|
|
3133
|
+
}
|
|
3134
|
+
) })
|
|
3135
|
+
]
|
|
3136
|
+
}
|
|
3137
|
+
)
|
|
3138
|
+
}
|
|
3139
|
+
),
|
|
3140
|
+
helperMessage ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { ref: helperRef, style: error ? styles7.error : styles7.hint, children: helperMessage }) : null,
|
|
3141
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: closePicker, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles7.modalRoot, children: [
|
|
3098
3142
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3099
|
-
reactNative.
|
|
3143
|
+
reactNative.Pressable,
|
|
3100
3144
|
{
|
|
3101
|
-
style:
|
|
3102
|
-
|
|
3103
|
-
|
|
3145
|
+
style: styles7.backdrop,
|
|
3146
|
+
onPress: closePicker,
|
|
3147
|
+
accessibilityRole: "button",
|
|
3148
|
+
accessibilityLabel: labels?.closeCalendar ?? translations.closeCalendar
|
|
3104
3149
|
}
|
|
3105
3150
|
),
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
{
|
|
3109
|
-
size: CALENDAR_FIELD_ICON_SIZE,
|
|
3110
|
-
color: disabled ? colors.stormGray200 : colors.stormGray150
|
|
3111
|
-
}
|
|
3112
|
-
) })
|
|
3113
|
-
]
|
|
3114
|
-
}
|
|
3115
|
-
) }),
|
|
3116
|
-
helperMessage ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { ref: helperRef, style: error ? styles7.error : styles7.hint, children: helperMessage }) : null,
|
|
3117
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: closePicker, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles7.modalRoot, children: [
|
|
3118
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3119
|
-
reactNative.Pressable,
|
|
3120
|
-
{
|
|
3121
|
-
style: styles7.backdrop,
|
|
3122
|
-
onPress: closePicker,
|
|
3123
|
-
accessibilityRole: "button",
|
|
3124
|
-
accessibilityLabel: labels?.closeCalendar ?? translations.closeCalendar
|
|
3125
|
-
}
|
|
3126
|
-
),
|
|
3127
|
-
anchor ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3128
|
-
reactNative.View,
|
|
3129
|
-
{
|
|
3130
|
-
style: [
|
|
3131
|
-
styles7.panelPosition,
|
|
3132
|
-
{
|
|
3133
|
-
top: dropdownTop,
|
|
3134
|
-
left: panelLeft,
|
|
3135
|
-
width: panelWidth,
|
|
3136
|
-
height: CALENDAR_PANEL_HEIGHT
|
|
3137
|
-
}
|
|
3138
|
-
],
|
|
3139
|
-
children: props.mode === "range" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3140
|
-
Calendar,
|
|
3141
|
-
{
|
|
3142
|
-
mode: "range",
|
|
3143
|
-
value: props.value,
|
|
3144
|
-
onChange: handleRangeSelect,
|
|
3145
|
-
viewDate,
|
|
3146
|
-
defaultViewDate: resolvedDefaultViewDate,
|
|
3147
|
-
onViewDateChange,
|
|
3148
|
-
locale: resolvedLocale,
|
|
3149
|
-
labels,
|
|
3150
|
-
minDate,
|
|
3151
|
-
maxDate,
|
|
3152
|
-
today,
|
|
3153
|
-
className: panelClassName
|
|
3154
|
-
}
|
|
3155
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3156
|
-
Calendar,
|
|
3151
|
+
anchor ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3152
|
+
reactNative.View,
|
|
3157
3153
|
{
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3154
|
+
style: [
|
|
3155
|
+
styles7.panelPosition,
|
|
3156
|
+
{
|
|
3157
|
+
top: dropdownTop,
|
|
3158
|
+
left: panelLeft,
|
|
3159
|
+
width: panelWidth,
|
|
3160
|
+
height: CALENDAR_PANEL_HEIGHT
|
|
3161
|
+
}
|
|
3162
|
+
],
|
|
3163
|
+
children: props.mode === "range" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3164
|
+
Calendar,
|
|
3165
|
+
{
|
|
3166
|
+
mode: "range",
|
|
3167
|
+
value: props.value,
|
|
3168
|
+
onChange: handleRangeSelect,
|
|
3169
|
+
viewDate,
|
|
3170
|
+
defaultViewDate: resolvedDefaultViewDate,
|
|
3171
|
+
onViewDateChange,
|
|
3172
|
+
locale: resolvedLocale,
|
|
3173
|
+
labels,
|
|
3174
|
+
minDate,
|
|
3175
|
+
maxDate,
|
|
3176
|
+
today,
|
|
3177
|
+
className: panelClassName
|
|
3178
|
+
}
|
|
3179
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3180
|
+
Calendar,
|
|
3181
|
+
{
|
|
3182
|
+
mode: "single",
|
|
3183
|
+
value: props.value,
|
|
3184
|
+
onChange: handleSingleSelect,
|
|
3185
|
+
viewDate,
|
|
3186
|
+
defaultViewDate: resolvedDefaultViewDate,
|
|
3187
|
+
onViewDateChange,
|
|
3188
|
+
locale: resolvedLocale,
|
|
3189
|
+
labels,
|
|
3190
|
+
minDate,
|
|
3191
|
+
maxDate,
|
|
3192
|
+
today,
|
|
3193
|
+
className: panelClassName
|
|
3194
|
+
}
|
|
3195
|
+
)
|
|
3170
3196
|
}
|
|
3171
|
-
)
|
|
3172
|
-
}
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3197
|
+
) : null
|
|
3198
|
+
] }) })
|
|
3199
|
+
]
|
|
3200
|
+
}
|
|
3201
|
+
);
|
|
3176
3202
|
}
|
|
3177
3203
|
var styles7 = reactNative.StyleSheet.create({
|
|
3178
3204
|
wrapper: {
|
|
@@ -3180,11 +3206,24 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
3180
3206
|
maxWidth: "100%",
|
|
3181
3207
|
gap: SELECT_LABEL_GAP
|
|
3182
3208
|
},
|
|
3209
|
+
wrapperFluid: {
|
|
3210
|
+
width: "100%"
|
|
3211
|
+
},
|
|
3183
3212
|
fieldOutline: {
|
|
3184
3213
|
width: CALENDAR_FIELD_WIDTH,
|
|
3185
3214
|
maxWidth: "100%",
|
|
3186
3215
|
alignSelf: "flex-start"
|
|
3187
3216
|
},
|
|
3217
|
+
fieldOutlineFluid: {
|
|
3218
|
+
width: "100%",
|
|
3219
|
+
alignSelf: "stretch"
|
|
3220
|
+
},
|
|
3221
|
+
fieldContainerFluid: {
|
|
3222
|
+
width: "100%",
|
|
3223
|
+
minWidth: 0,
|
|
3224
|
+
maxWidth: "100%",
|
|
3225
|
+
alignSelf: "stretch"
|
|
3226
|
+
},
|
|
3188
3227
|
label: {
|
|
3189
3228
|
...calendarLabelTypography
|
|
3190
3229
|
},
|